Repair “The Process Cannot Access the File Because It Is Being Used By another Process” Error - WindowsTips.net - Windows Tips and Tricks with Geek

Monday, July 19, 2021

Repair “The Process Cannot Access the File Because It Is Being Used By another Process” Error

 

The Process Cannot Access the File Because It Is Being Used By another Process” Error

Method #1: Running the Command With Admin Privileges

If you are coming across this error message while running the netsh command, it may happen that you are facing this error because you do not have admin privileges. This error will display often whenever the user will try to run the command which includes exclusions to dynamic port range for other Windows application or third party apps.

To be assured that this type of operation will need a Administrator privileges follow the given steps below:

  • Click on the Windows key + R at the same time to open the Run dialog box. After that, enter “cmd” and tap Ctrl + Shift + Enter to open an elevated Command Prompt.
  • When prompted by  UAC (User Account Control), press Yes to allow admin privileges.
  • In an elevated Command Prompt, run the command once again and check if you are coming across the same error message or not.

The process cannot access the file because it is being used by another process error is still displaying then check out the next method given below.

Method 2: Setting a Different IP Range

If the method given below doesn’t help you then try to do it in a different a way; if you are trying to solve a DNS issue using netsh command.

Many users are struggling to solve the same error have found that the issue is solve after they have tried to set a totally different IP range in the place of creation of an exclusion range.

To solve the DNS and Quickbooks conflicts I have provided the commands for you to successfully solve this issue.

netsh int ipv4 set dynamicport tcp start=10000 num=1000

netsh int ipv4 set dynamicport udp start=10000 num=1000

Note: Be assured that the terminal you are running have the admin privileges.

Try another method to solve the particular issue if the above given methods didn’t work for you.

Method 3: Resolving the IIS Port Conflict

On right clicking the website item in the IIS MMC snap-in (clicking Windows key doesn’t do anything), then in this case you need to use Netsat.exe utility to find out if any other process is using port 80 and port 443.

This is the common problem with system running Microsoft IIs 6.0 and 7.0. On the basis of the official Microsoft documentation, error message will show if you are facing any of the conditions from the below given situation:

If you are encountering the issue while trying to right-click a website item inside the IIS MMC snap-in (clicking Start doesn’t do anything), you’ll need to use the Netstat.exe utility to figure out if another process is using port 80 and port 443.

This issue is quite common with computers running Microsoft IIS 6.0 and 7.0. Based on the official Microsoft documentation, the error message will appear if one of the following conditions are applicable to your current situation:

  1. The ListenOnlyList registry subkey is configured wrongly on IIS running system.
  1. Any other process is using TCP port (80)/ SSL port (443) needed by the IIS.
  • To solve the problem, we will need to organize the exe utility to find if any other process using the particular ports given mentioned above. If the utility find that the mentioned ports are not being used, then we will examine the ListenOnlyList subkey to check if it is rightly configured or not.

Follow the steps given below:

  • Click on the Windows key + R à open Run dialog box. After that, type “cmd” à Click Ctrl + Shift + Enter à elevated Command Prompt will open. When directed by UAC (User Account Control), tap on Yes to give administrative privileges.

using cmd command prompt

  • Inside elevated command prompt, run the given command to start exe utility:

netstat -ano

  • Once you will get a return, scroll over the list of Active Connections and check whether the ports 50 & 443 are actively used by a different process.

Note: If ports are actively used via different process, now as you are able to identify the main cause of your problem.

Close elevated Command Prompt as we would not need admin privileges for the further steps.

  • If ports are not being actively used, then press Windows key + R at the same time à Run dialog box will open. After that, enter ‘regedit‘ and hit Enter a Registry Editor will open. When directed by UAC (User account control), tap Yes to give administrative privileges.

Resolving the IIS Port Conflict

  • Inside Registry editor, use left pane to navigate to the following position:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\ListenOnlyList

Note: If ListenOnlyList subkey is absent, there is no need to create another as an IP address of 0.0.0.0 can be used by default.

  • Before going further and modify ListenOnlyList subkey, you will need to stop HTTP service which is running IIS. So keep the Registry Editor in background as we will return to it in a moment.
  • After that, click on the Windows key + R a Run dialog box will open, type ‘cmd‘ and hit Enter à another Command Prompt Window will open.

using cmd command prompt

  • In Cmd prompt, run the given command and hit Enter to stop HTTP service which is responsible for running IIS:

net stop http

  • When questioned whether you want to continue the operation or not, type ‘Y’ and hit Enter to confirm the operation.
  • Once HTTP service is unabled, close the Command Prompt Window and return to Registry Editor.

Resolving the IIS Port Conflict

  • When ListenOnlyList subkey is selected, move over to right-hand pane and be assured that it contains justified IP addresses. If you find an IP address which is not valid, remove it or you can modify it to reflect entry with a justified IP address.

Note: In case, ListenOnlyList subkey is available and 0.0.0.0 IP address is listed, you have to delete the other IP addresses present in it.

  • Close Registry Editor and restart the system.
  • HTTP service should be started automatically at the next startup. To be assured, click Windows key + R à another Run dialog box will open. After that, type “cmd” and hit Enter to open the Command Prompt Window.

using cmd command prompt

  • In freshly opened Command Prompt, enter the given command to be assured that the HTTP service is started:

net start http

  • Note:If you get a message showing that “The requested service has been already started” you are ready to go.
  • Try to start the service from the Microsoft Internet Information Services (IIS) Microsoft Management Console (MMC) snap-in. You will not face the ‘process cannot access the file because it is being used by another process in Windows 10’ error.

No comments:

Post a Comment