When you try to install a program, the installer may encounter the error 1310. The error code 1310 means “Error attempting to create the destination file.”
Error 1310. Error writing to file: <filename> Verify that you have access to that directory.
The error 1310 occurs if the installer cannot create files in the specified folder due to insufficient NTFS permissions.
To resolve the issue, assign the “Administrators” group and the SYSTEM (Local System) account full control permissions for that folder.
To do so, follow these steps:
Download the AdvancedRun utility from Nirsoft and start CMD.exe as TrustedInstaller (Instructions are here).
In the TrustedInstaller Command Prompt, run:
icacls <folder path> /grant Administrators:F icacls <folder path> /grant "NT AUTHORITY\SYSTEM":F
icacls c:\windows\system32\en-us /grant Administrators:F icacls c:\windows\system32\en-us /grant "NT AUTHORITY\SYSTEM":F
(For each command, you should see the message “Successfully processed 1 files; Failed processing 0 files” in the output.)
If you want to add the required permissions recursively (i.e., for the specified folder, its subfolders, and files), use the following command instead:
icacls c:\windows\system32\en-us /grant Administrators:F /T /C icacls c:\windows\system32\en-us /grant "NT AUTHORITY\SYSTEM":F /T /C
(For more information, see Take ownership of a file or folder and assign permissions)
See if you can install the software now. It’s advisable to launch the installer via admin Command Prompt or Task Manager → Run New Task → “Create this task with administrative privileges”.
Note: You can also do the above without using the AdvancedRun tool. In that case, use the takeown.exe command to take ownership of the folder before using icacls.exe. However, the AdvancedRun method can be more effective because the TrustedInstaller account has the highest privileges.
One small request: If you liked this post, please share this?One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!