Full Fix: ‘Error opening file for writing’ on Windows 10, 8.1, 7

By: Milan Stanojevic
8 minute read

For various PC problems, we recommend to use this tool.

This tool will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Quickly fix PC issues and prevent others from happening with this software:

  1. Download this PC Repair Tool with Patended Technologies
  2. Click “Start Scan” to find Windows issues that could be causing PC problems.
  3. Click “Repair All” to fix all issues (requires upgrade).

Installing new software on Windows 10 is rather simple, however, users reported Error opening file for writing error message while installing certain applications. It seems that this problem can affect almost any application, thus preventing you from installing it. Since this issue prevents you from installing additional software, it might seem serious, but you can easily fix it by following one of these solutions.

Fix Error opening file for writing on Windows 10

Error opening file for writing can be a big problem since you won’t be able to run certain files on your PC. Speaking of this error, users reported the following issues:

  • Error opening file for writing MSI Afterburner, Kodi, Steam, VLC, Wireshark, CCleaner, BSPlayer, Hotspot Shield – This problem can affect many applications, and if you’re having this issue, you might be able to fix the issue simply by reinstalling the affected applications.
  • Error opening file for writing qt5core.dll, vcredist_x86.exe, npf.sys, msvcr110.dll – Many users reported that this error is caused by certain files on your PC. To fix the issue, you might have to reinstall the components that are in charge of these files and check if that solves the problem.
  • Error opening file for writing Windows 7, Windows 8 – This error message can appear on any version of Windows, and both Windows 7 and 8 users reported it. Even if you don’t use Windows 10, you should be able to apply most of our solutions to your Windows 7 or 8 PC.

Solution 1 – Check your antivirus

According to users, sometimes your antivirus can cause Error opening file for writing error message to appear. Even though your antivirus is crucial when it comes to protecting your safety online, sometimes the antivirus can interfere with your files and cause this error to appear.

To fix the problem, users are suggesting to change your antivirus settings and check if that solves the issue. You can start with disabling certain features and see if that helps. If you don’t know which feature to disable, you can always disable your antivirus altogether and check if that solves the issue.

If that doesn’t help, you might have to remove your antivirus and check if that solves the issue. Since your old antivirus was causing this issue, it might be a good idea to switch to a new antivirus software. There are many great security tools available, but the best are Bitdefender, BullGuard, and Panda Antivirus, so feel free to try any of them.


Solution 2 – Run the Compatibility troubleshooter

In certain cases, older software might not be fully compatible with Windows 10, and if that’s the case, you might get Error opening file for writing error message while installing it. In order to fix this issue, you need to do the following:

  1. Right click the setup file of the problematic application.
  2. Choose Properties from the menu.
    Error opening file for writing npf.sys
  3. Once Properties window opens, navigate to Compatibility tab.
  4. Click Run compatibility troubleshooter.
    Error opening file for writing msvcr110.dll
  5. Select Try the recommended settings.
    Error opening file for writing VLC
  6. Follow the instructions and your problem should be fixed.

In addition to using Compatibility troubleshooter, you can just set the program to run in compatibility mode in order to fix this problem.


Solution 3 – Run program as administrator

Sometimes, you’ll get Error opening file for writing error message if your user account lacks certain privileges. The simplest solution for this problem is to install the problematic application as an administrator. To do that follow these steps:

  1. Right click the setup file.
  2. Select Run as administrator from the menu.
    Error opening file for writing Kodi

If running the application as an administrator fixes the problem, you’ll have to repeat this workaround every time you want to start this application. If you want a more permanent solution, you can set the application to always run with administrative privileges. To do that, just follow these steps:

  1. Right click the application that is giving you this problem and choose Properties from the menu.
  2. Now navigate to the Compatibility tab and check Run this program as an administrator.
    Error opening file for writing Windows 7
  3. Click on Apply and OK to save changes.

After doing that, the application will always run with administrative privileges and you won’t experience this issue anymore.


Solution 4 – Reinstall the problematic application

According to users, sometimes this error can occur if you’re trying to run a specific application. If this happens, it means that your installation is probably corrupted, and to fix the problem you need to reinstall the application.

There are several ways to do that, but the best one would be to use uninstaller software. In case you’re not familiar, uninstaller software is a special tool that can completely remove any application from your PC. In addition to removing an application, uninstaller software will also remove all files and registry entries associated with that application ensuring that the application is completely removed from your PC.

Once you remove the application, install it again and check if that solves your problem.


Solution 5 – Create a new administrator account

If the problem with Error opening file for writing still persists, you might have to create a new administrator account and install the application on that account. To do that, follow these steps:

  1. Open Settings app.
  2. Navigate to Family & other users tab and click the Add someone else to this PC button.
    Error opening file for writing CCleaner
  3. Select I don’t have this person’s sign-in information.
    Error opening file for writing MSI Afterburner
  4. Now click on Add a user without a Microsoft account.
    Error opening file for writing qt5core.dll
  5. Add a user name and password for this account and click Next.
    Error opening file for writing Windows 7
  6. You should see newly created account available in Other users section. Select it and click on Change account type button.
    Error opening file for writing vcredist_x86.exe
  7. From the account type menu select Administrator and click OK.
    Error opening file for writing Windows 8
  8. Now switch to the newly created administrator account and try installing the application again.

Alternatively, you can enable hidden administrator account using the Command Prompt. To do that, follow these steps:

  1. Press Windows Key + X shortcut and select Command Prompt (Admin) from the menu.
    Error opening file for writing Steam
  2. When Command Prompt starts, enter net user administrator /active:yes and press Enter to run it. This will enable a new administrator account that you can switch to in order to install the problematic software.
    Error opening file for writing MSI Afterburner

If you wish to disable this administrator account, switch back to your old account, open Command Prompt as administrator and enter net user administrator /active:no.


Solution 6 – Change the security permissions

By default, regular users aren’t allowed to install applications, and if you try to do that, you’ll probably encounter “Error opening file for writing” error message. If you can’t install a certain application as a regular user, we strongly advise you to create an administrator account or try to install the application as an administrator in order to avoid this issue.

If you don’t want to use an administrator account, you might want to change security permissions. To do that, follow these steps:

  1. Locate the folder in which you’re trying to install the problematic application. For example, it could be C:\Program Files\Steam directory.
  2. Once you’ve located the directory, right click it and choose Properties.
  3. Navigate to Security tab and click the Edit button.
    Error opening file for writing qt5core.dll
  4. Select Users from the Group or user names and check under Permissions for Users section, check Write.
    Error opening file for writing Windows 7
  5. Click OK and Apply.

After you’ve changed security permissions, you should be able to install applications to that specific folder.


Solution 7 – Disable User Account Control

User Account Control is designed to notify you whenever there’s a system related change that requires administrator privileges. This feature is designed to protect you, but it can sometimes interfere with other software and cause Error opening file for writing error message. To disable User Account Control, do the following:

  1. Press Windows Key + S and enter User Account. Select Change User Account control settings.
    Error opening file for writing Windows 8
  2. Move the slider all the way down until it says Never notify.
    Error opening file for writing Wireshark
  3. Click OK to save the changes.

After you’ve disabled User Account Control, Error opening file for writing error message shouldn’t appear anymore. In addition to turning off User Account Control, users are also reported that turning off Windows Defender fixes this problem.

If you have any third-party antivirus software installed, Windows Defender should be turned off by default, but if you don’t use any third-party antivirus software, try disabling Windows Defender. It’s worth mentioning that third-party antivirus software can protect your PC and improve your safety online, and we did a list of best Windows 10 antivirus software, so make sure that you have a look at it.


Solution 8 – Change advanced security permissions

Changing security permissions isn’t always the best option, and we strongly advise that you try installing the problematic application by running its setup file as an administrator or by using an administrator account. If both of these options aren’t working for you, you might want to try changing advanced security permissions by following these steps:

  1. Locate the folder in which you’re trying to install the problematic app. In our example we’ll use C:\Program Files\Steam.
  2. Right click the folder and choose Properties.
  3. Navigate to Security tab and click the Advanced button.
    Error opening file for writing Kodi
  4. Click the Change permissions button and click on Add.
  5. Click on Select a principal.
    rror opening file for writing vcredist_x86.exe
  6. In Enter the object name to select section enter Everyone and click Check Names and OK.
    Error opening file for writing Windows 8
  7. In Basic permissions section select Full control and click OK.
    Error opening file for writing Steam
  8. From Permission entries list select Everyone and check Replace all child object permission entries at the bottom.
    Error opening file for writing npf.sys
  9. Click Apply and OK to save changes.

After changing the security permissions you’ll be able to install the application to that folder without any issues.


Solution 9 – Use registry cleaner software to clean up your registry

In some cases, Error opening file for writing error message appears due to problems in the registry. In order to fix this, the simplest solution is to download and run any registry cleaner. We covered the best registry cleaners for Windows 10, so make sure that you check it out in order to find a proper registry cleaner for you.

Speaking of registry cleaners, there are many great tools available, and if you’re looking for a new registry cleaner, you might want to consider Wise Registry Cleaner, Registry Repair, or Advanced SystemCare. Another tool that can also help you is CCleaner since it can clean both your registry and temporary files.

Error opening file for writing error message will prevent you from installing certain software, however, this problem can be easily fixed by switching to administrator account or by using any other solution from this article.


Editor’s Note: This post was originally published in May 2016 and has been since completely revamped and updated for freshness, accuracy, and comprehensiveness.


Next up

These features are out for good with Windows 10 version 1809

iamsovy@gmail.com' By: Sovan Mandal
2 minute read

Microsoft is all set to launch its next big update, Windows 10 version 1809 in October. While that should be a nice piece of news […]

Continue Reading

Windows 10 18H2 builds no longer receive new features

By: Matthew Adams
3 minute read

The Windows 10 October 2018 Update (otherwise 18H2) rollout might now be two to three weeks away. For the last few months, new build previews […]

Continue Reading

Windows 7 KB4457139 makes it easier to upgrade to Windows 10

By: Madeleine Dean
2 minute read

Microsoft released a new Windows 7 update to the general public. Update KB4457139 is actually a preview of the upcoming monthly rollup update and allows users […]

Continue Reading

Discussions