Fix: Error Opening File For Writing

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 on Run 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 on Properties in the resulting context menu.
  4. Navigate to the Compatibility tab.
  5. Click on Run compatibility troubleshooter.
  6. Click on Try 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 on Properties.
  3. Navigate to the Security tab.
  4. Click on Edit….
  5. Click on Users under the Group or user names section to select it.
  6. Check the checkbox for Allow next to Write under Permissions for users.
  7. Click on Apply and then on OK.
  8. Restart your 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 on Properties.
  3. Navigate to the Security tab.
  4. Click on Advanced.
  5. Click on Change permissions and then click on Add.
  6. Click on Select a principal.
  7. In the Enter an object name to select: field, type Everyone, click on Check Names and then click on OK.
  8. Under Basic permissions:, check the checkbox beside Full control and click on OK.
  9. In the list located directly under the Permission entries: section, click on the Everyone listing to select it and enable the Replace all child object permission entries with inheritable permission entries from this object option.
  10. Click on Apply and then on OK.
  11. Restart your 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

The User Account Control feature, 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 Control can be disabled. To disable User Account Control, you need to:

  1. Open the Start Menu.
  2. Search for “user accounts“.
  3. Click on the search result titled User Accounts.
  4. Click on Change User Account Control settings.
  5. Move the slider all the way down to Never notify.
  6. Click on OK and, if required to do so, confirm the action.
  7. Restart your 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 the Start Menu.
  2. Click on Settings.
  3. Click on Accounts.
  4. Click on Family & other users in 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 on I don’t have this person’s sign-in information.
  7. Click on Add a user without a Microsoft account.
  8. Type in a user name and a password for the new user account and click on Next.
  9. The new user account you created should now show up under Other users. Click on it to select it and click on Change account type.
  10. Open the dropdown menu and click on Administrator to select it, and then click on OK.
  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 and delete the old user account.

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.

Expert Tip

Fix: Error Opening File For Writing

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested