Fix "The process cannot access the file" error in Windows 10
Imagine that you are trying to use your favorite application and you see a Windows 10 error message The process cannot access the file because it is being used by another process. Now the only solution that will come to your mind is to close the error message. Unfortunately, this method will not fix the error on your computer. Read the entire article to know the method to fix the error on Windows 10 PC.
How to fix "The process cannot access the file" error in Windows 10
For a list of reasons for a file access error message, see this topic:
- administrative privileges. You may see an error message if the main folders for accessing the drivers are not granted administrative privileges.
- Another process is using port 80 or port 443. If any other process is using the IP address range, port 80 or port 443, you may encounter this error message.
- The ListenOnlyList registry subkey is incorrectly configured. The ListenOnlyList subkey and the IIS port may not be configured correctly in the Registry Editor.
Method 1: Basic Troubleshooting Methods
The first way to fix the process cannot access the file in Windows 10 is to try the basic troubleshooting methods given below.
1. Close background processes
If there are many applications open in the background, you may see an error message on your PC. You can fix this problem by closing all applications running in the background using the link provided here.

2. Run the application as administrator
The error message may appear if the application has not been granted administrator rights; you can fix the error by running the application as administrator.
1. Press the Windows key, type "Command Prompt" and click "Run as administrator".
Note. The command line application is selected for explanatory purposes.

2. Click Yes on the User Account Control prompt to run the application as an administrator.
Method 2: Change the IP address range
The process cannot access the file. The error can occur if other processes are using port 80 or port 443. You can try changing the process's IP address range or setting a different IP address range to fix the problem.
1. Run the command prompt as an administrator.

2. Enter the following commands in the application and press the Enter key to set a different IP address range for TCP ports.
netsh int ipv4 set dynamicport tcp start=10000 num=1000

3. Enter the following commands in the application and press the Enter key to set a different IP address range for UDP ports.
netsh int ipv4 set dynamicport udp start=10000 num=1000

Method 3: Resolve IIS Port Conflict
An error message in which the process cannot access the file because it is being used by another process may appear if there is a conflict with the IIS port and the HTTP service. You can resolve the error by editing the ListenOnlyList subkey in the Registry Editor.
1. Open a command prompt as an administrator.

2. Type the command netstat –ano and press the Enter key to run the Netstat.exe utility and view a list of active connections.

3. Enter the net stop http command and press the Enter key to stop the HTTP service on your PC.
Note. The HTTP service will use the IIS port, so you must stop this service before changing the key.

4. Type Y and press the Enter key in the Do you want to continue this operation?

5. Press the Windows key, type "Registry Editor" and click "Open".

6. Change to the ListenOnlyList directory using the following location path in the Registry Editor.
ComputerHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesHTTPParametersListenOnlyList

7. Right-click on all IP addresses individually other than the default 0.0.0.0 and select the Delete option to delete the subkey.

8. Click the "Yes" button in the "Confirm Delete UAC Value" window.

9. Close the registry editor and restart your computer.
10. Run the command line as above to make sure the HTTP service is running.
11. Type the net start http command and press the Enter key.

Method 4: Change the port number
One of the reasons why a process cannot access a file in Windows 10 is the use of the peripheral agent HubCapp. This is third party software that can be used to access drivers and scales connected to your PC as peripherals. However, if the port number in the software conflicts with other processes, you may experience this error.
1. Press the Windows key + E at the same time to open File Explorer and navigate to the HubCapp edge agent folder using the location path.
C:Program Files (x86)HubCapp Peripheral Agent
Note. Close the HubCapp edge agent before making any changes.

2. Double-click the setup.xml file in the list.

Note. You can also make a copy of this file on your desktop and rename it to setup.xml_OLD. After changing a file on the desktop, you can move the file to this folder.
3. Change the MinPortNumber value from 50000 to 60000 and press Ctrl+S to save the file.
4. Open the HubCapp Edge Agent on your PC to check if the issue is resolved.
Frequently Asked Questions (FAQ)
Q1. Is any third party app responsible for the file access error message on Windows 10 PC?
Answer The HubCapp Peripheral Agent is a third party software that can access the peripherals connected to your PC. If the port number in the software is set incorrectly, you may see this error message.
Q2. Why can't the process access the file when I try to open any application?
Answer The error message is usually caused by a misconfiguration of the port number and IP address range. The article describes how to change the port number and IP address range to resolve the error.
***
This article discusses the causes and how to fix a process that cannot access a file because it is being used by another process. Try to implement all the methods described in the article and please leave your suggestions and questions in the comments section.