Fix The system cannot open the file error in a few steps

Madalina Dinita
by Madalina Dinita
Managing Editor
Loading Comments
Download PDF
Affiliate Disclosure

  • Encryption & Data protection usually provide effective protection against unauthorized processing on your Windows PC.
  • The system cannot open the file is one of the many system errors that require immediate intervention.
  • There are certainly various tips that could help. In most cases, the error is solved when removing folder encryption or repairing your registry.
  • Check out our dedicated Windows 10 errors hub for more handy articles.
Error The system cannot open the file

If you’re getting the annoying ERROR_TOO_MANY_OPEN_FILES error code on your PC with the description The system cannot open the file, follow the troubleshooting steps listed in this article to fix it.

This error occurs mainly when users try to install a Microsoft Windows Installer package. The root cause of this error is folder encryption. More specifically, this problem may occur if one of the following conditions are met:

  • The Windows Installer package folder is encrypted or the folder in which you want to install the Windows Installer package is encrypted.
  • The temp folder (%TEMP%) is encrypted on a version of Windows other than Windows Vista. Tools such as the Microsoft Encrypting File System Assistant may have encrypted the temp folder, triggering this error code.

What can I do if getting The system cannot open the file error?

1. Remove folder encryption

folder encryption

  1. Save the Windows Installer package to a folder that is not encrypted.
  2. Install the Windows Installer package to a folder that is not encrypted.
  3. Turn off encryption of the %TEMP% folder.

In order to fix this error, you need to eliminate the elements triggering it. In other words, apply the above steps.

At the same time, disconnect all peripherals from your computer during the install process. Sometimes, peripherals may cause various install issues and the best way to prevent this problem is to simply unplug them.

If you’re still experiencing The system cannot open the file error after performing the steps listed above, continue with the following troubleshooting steps.


2. Repair your registry

  1. Go to Start > type cmd > right-click Command Prompt > select Run as Administrator.Run as Administrator
  2.  Now type the sfc /scannow command.enter sfc /scannow command
  3.  Wait for the scanning process to complete and then restart your computer. All corrupted files will be replaced on reboot.

The simplest way to repair your registry is to use a dedicated tool, such as CCleaner. Don’t forget to first backup your registry in case anything goes wrong.

If you haven’t installed any registry cleaner on your computer, check out our article on the best registry cleaners to use on Windows 10 PCs.

You can also use Microsoft’s System File Checker to check for system file corruption. However, this utility is only available on Windows 10. Here’s how to run an SFC scan.


Having problems using the SFC tool? Check this useful guide and set things right once again.


3. Update your OS

how to update your OS

Make sure that you’re running the latest Windows OS updates on your machine. As a quick reminder, Microsoft constantly rolls out Windows updates in order to improve the system’s stability and fix various issues.

Go to Windows Update, check for updates and install the available updates. To access the Windows Update section, you can simply type update in the search box.


4. Run the chkdsk command

  1. Go to Start > type cmd > right-click the first results and launch Command Prompt as Administrator.
  2. Enter the chkdsk /f X: command. Replace X with the appropriate letter of your partition, then hit Enter. chkdsk /f X: 
  3. Wait for chkdsk to repair your files.

The chkdsk command helps you detect and repair various disk issues, including corrupted files and folders which may cause various errors.

If you’re having trouble accessing Command Prompt as an admin, then you better take a closer look at this guide.


5. Disable your antivirus

Sometimes, your antivirus may prevent you from installing new software on your PC or upgrading the existing software.

Temporarily disable your antivirus and then try to complete the install process. Don’t forget to enable your antivirus after you finish installing the package.

If you’ve come across other solutions to fix The system cannot open the file error, feel free to list them in the comments section below.

FAQ: Learn more about the Windows Installer service

  • What is the use of Windows Installer service?

The latest Windows Installer versions can install multiple patches in a single transaction, and apply patches in a specified order. Users can then uninstall these patches at any given moment.

Windows Installer also secures new accounts, Windows Services, files, folders, and registry keys by specifying a security descriptor that denies or allows permissions.

Editor’s Note: This post was originally published in September 2017 and has been since revamped and updated in March 2020 for freshness, accuracy, and comprehensiveness.

Was this page helpful?
Thanks for letting us know!
Get the most from your tech with our daily tips
Tell us why!