When installing a third-party application on a Windows computer, there are a lot of things that can go wrong. One of the most common problems faced by Windows users while trying to install third-party programs is an issue where the installation fails because Windows, for some reason, fails to open a file it needs to write in order to install the program in question. When this issue occurs, the user is informed that the installation was unsuccessful and Windows spits out the following error message:

"Error opening file for writing"

This specific problem is not bound to any specific version of the Windows Operating System – every single version of the Windows Operating System that is currently supported by Microsoft is prone to this problem. In addition, this issue is also not bound to any specific program or set of programs designed for Windows – it can basically affect any third-party Windows application and prevent it from being successfully installed. Not being able to install an application you want or need on your computer is most definitely a significant problem, but, thankfully, it is not an unfixable one. The following are some of the most effective solutions that any Windows user affected by this problem can use to try and resolve it and successfully install the affected application:

Solution 1: Run the installer for the program with administrative privileges

If you're having trouble installing any third-party application designed for the Windows Operating System, the most commonly recommended course of action is to perform the installation as an administrator and see if doing so gets the job done. To run the installer for the third-party Windows application you are trying to install as an administrator, you need to:

  1. Navigate to where the .EXE file for the installer of the program is stored.
  2. Locate the installer and right-click on it.
  3. Click onRun as administrator in the resulting context menu.
  4. Go through the installation wizard by following the onscreen instructions and see if the "Error opening file for writing" error message rears its ugly head while the installation is being performed with administrative privileges.

Solution 2: Run the compatibility troubleshooter

If you are trying to install a third-party program that is not entirely compatible with the version and iteration of the Windows Operating System that your computer is running on, the installation might fail and you might end up being seeing the "Error opening file for writing" error message. Thankfully, though, Windows has the compatibility troubleshooter to check for and try to repair compatibility problems with files. To run the compatibility troubleshooter, you need to:

  1. Navigate to where the .EXE file for the installer of the affected program is stored.
  2. Locate the installer and right-click on it.
  3. Click onProperties in the resulting context menu.
  4. Navigate to theCompatibilitytab.
  5. Click onRun compatibility troubleshooter.
  6. Click onTry recommended settings.
  7. Follow the onscreen instructions and bear with the compatibility troubleshooter all the way to the very end.
  8. Once the compatibility troubleshooter is done working its magic, try installing the affected application to see whether the problem has been resolved.

Solution 3: Change the security permissions for the installation location

You might be seeing the "Error opening file for writing" error message while trying to install a specific application because the security permissions for the installation location you have chosen for it do not allow files located in it to be written by your user account. If that is the case, you should be able to resolve the problem by fixing the security permissions for the directory you are trying to install the affected application to. To apply this solution, you need to:

  1. Navigate to the installation location for the affected third-party program.
  2. Right-click on the folder you are trying to install the affected third-party program to, and click onProperties.
  3. Navigate to theSecuritytab.
  4. Click onEdit….
  5. Click onUsers under theGroup or user names sectionto select it.
  6. Check the checkbox forAllownext toWriteunderPermissions for users.
  7. Click onApplyand then onOK.
  8. Restartyour computer.

When the computer boots up, try running the installer and see if the "Error opening file for writing" error message still persists.

Solution 4: Change advanced security permissions for the installation location

If simply changing the regular security permissions for the installation location isn't enough to get the job done, you take another step forward and change the advanced security permissions for the installation location. To change the advanced security permissions for the installation location, you need to:

  1. Navigate to the installation location for the affected third-party program.
  2. Right-click on the folder you are trying to install the affected third-party program to, and click onProperties.
  3. Navigate to theSecuritytab.
  4. Click on Advanced.
  5. Click onChange permissionsand then click onAdd.
  6. Click onSelect a principal.
  7. In theEnter an object name to select:field, typeEveryone, click onCheck Namesand then click onOK.
  8. UnderBasic permissions:, check the checkbox besideFull controland click onOK.
  9. In the list located directly under thePermission entries: section, click on theEveryonelisting to select it and enable theReplace all child object permission entries with inheritable permission entries from this objectoption.
  10. Click onApplyand then onOK.
  11. Restartyour computer.

Wait for the computer to boot up and then try installing the third-party application your were previously having trouble installing to see if the problem has been resolved.

Solution 5: Disable User Account Control

TheUser Account Controlfeature, although a security feature built in to the Windows Operating System to protect users, can sometimes cause more harm than it does good, and causing the installations of certain third-party programs to fail with the "Error opening file for writing" error message is an example of such an instance. Thankfully, though,User Access Controlcan be disabled. To disableUser Account Control, you need to:

  1. Open theStart Menu.
  2. Search for "user accounts".
  3. Click on the search result titledUser Accounts.
  4. Click onChange User Account Control settings.
  5. Move the slider all the way down toNever notify.
  6. Click onOK and, if required to do so, confirm the action.
  7. Restartyour computer.
  8. When the computer boots up, try installing the affected application to see if the installation now goes through successfully.

Solution 6: Create a new user account and try installation the affected application on it

If absolutely none of the solutions listed and described above have managed to work for you, the problem might just lie with your user account itself. And if that's the case, you should be able to successfully install the affected third-party program on a different, brand new user account on your computer. To create a new administrator account on your computer, you need to:

  1. Open theStart Menu.
  2. Click onSettings.
  3. Click onAccounts.
  4. Click onFamily & other usersin the left pane.
  5. In the right pane of the window, under the Other users section, click on Add someone else to this PC.
  6. Click onI don't have this person's sign-in information.
  7. Click onAdd a user without a Microsoft account.
  8. Type in a user name and a password for the new user account and click onNext.
  9. The new user account you created should now show up underOther users. Click on it to select it and click onChange account type.
  10. Open the dropdown menu and click onAdministratorto select it, and then click onOK.
  11. Switch to your newly created user account and try installation the affected third-party application on it.

If the program is successfully installed on the new user account, your old user account itself was the problem. That being the case, you should simply move all of your data and files from your old user account to the new one anddeletethe old user account.

Photo of Kevin Arrows

Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.