Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home » Windows

Fix: The Process Cannot Access the File Because It is Being Used by Another Process

Deep ShresthaBy Deep ShresthaJune 19, 2023
the process cannot access the file because it is being used by another process

When running an application, it will access required files from the system. If an application tries to access a file that is currently in use by another process, you get this error message.

The error message may pop up during application installation, code compilation, or when running an app. Another common instance where you might see this error message is when starting a website through IIS.

To fix this, you need to close the process that is using the file. However, the problem is finding the process. So, you can first try locating and ending the process using the Resource monitor.

Table of Contents

  • Check Using Resource Monitor
  • Close Related Process/Application
  • Run Application/Process as Admin
  • Reinstall Application in Safe Mode
  • Disable Antivirus and Windows Defender
  • Reset Network
  • Fixes for IIS Manager

Check Using Resource Monitor

When the error message pops up, it might also give you the name of the file that is in use by another process. If it does, you can use a Windows built-in utility named Resource Monitor to check the process that is using the file.

To check the process using a resource monitor, 

  1. Press Windows + R, type resmon.exe, and press Enter.
    resmon exe file in use by another process
  2. Make sure that you are in the CPU tab.
  3. Expand Associated Handles.
  4. Type the filename in Search Handles. You should be able to see the file in the search result.
  5. Right-click on the file, and select End process.
    end process that is using the file
  6. The new process should now be able to access the file.

Close Related Process/Application

The error message may not always display the file name. You might find it difficult to locate the app that is using the file. So, try closing any unnecessary application that could cause conflicts with the process that you are trying to run.

  1. Press the Ctrl + Shift + Esc.
  2. Once the Task Manager opens, check any application that might be using the file that you are trying to access. 
  3. Click on the application and select End Task.
    end process task manager file in use by another process

Run Application/Process as Admin

Running an application as an admin allows the process to have access to resources that were not available previously. If possible try running the application as admin and check if the error still pops up.

Note: If you are getting the error message when trying to run a code or command through the command prompt or PowerShell, run the command in Elevated Command Prompt/Powershell mode.

If that does not work, try running the application in high-priority mode. This will also allow the system to allocate more resources to the application which might fix the issue. To do this,

  1. Open Task Manager.
  2. Go to the Details tab.
  3. Right-click on the application/process that is causing the issue.
  4. Click on set priority and set it to High.
    task manage set high priority

Reinstall Application in Safe Mode

You might also get an error message when trying to install an application. According to most users in Q/A forums, the error message pops up when installing games such as Roblox and Escape from Tarkov.

They’ve also reported that installing the game in safe mode with networking fixed the issue for them.

  1. Press Windows + R.
  2. Type msconfig and press enter. This will open System Configuration.
    msconfig file in use by another process
  3. Go to the Boot tab and check Safe Boot and Network.
    system configuration file in use by another process
  4. Click Apply and OK.
  5. Once the PC boots on safe mode, try installing the application.
  6. Again open System Configuration and disable Safe boot and restart the PC.

Disable Antivirus and Windows Defender

Application or a Process may run into issues when trying to access a file that is currently being scanned through Windows Defender or any other antivirus application. Accessing file might take a long time or might even give you an error message that says the file is in use by another process.

To make sure that this is not the case, try disabling any threat protection on your system. To disable Windows Defender, follow these steps.

  1. Open run, type windowsdefender: and press Enter.
    run windows defender file in use by another process
  2. Click on Virus and threat protection.
    open virus and threat protection file in use by another process
  3. Under Virus and threat protection settings select Manage settings.
    manage setting virus and threat protection
  4. Disable Real-time protection.
    enable real time protection virus and threat protection
  5. Similarly, if you have any third-party antivirus applications, disable protection on them as well.

Now try running the process that was causing the issue to see if it can access the file. Once the process completes its execution, make sure that you enable Windows Defender/antivirus.

Reset Network

Several users in Q/A forums have also reported that resetting the network fixed the issue for them. By resetting the network, it reverts all network settings to its default values. 

To reset the network,

  1. Press the Windows + I key.
  2. Navigate to Network & Internet > Advanced network settings.
    open network and internet settings file in use by another process
  3. Click on Network Reset.
    network reset file in use by another process
  4. Click on Reset Now. The PC will now restart in 5 minutes.

Fixes for IIS Manager

The issue also occurs when trying to start a website through IIS. In such cases, here are some things that you can try.

Close Processes Using Conflicting Ports

By default, the IIS (Internet Information Service) uses port 80 for HTTP and 443 for HTTPS requests. If there is an application in your system that is also using the same port, you will get the error message when you start the default website. 

To fix this, you either need to close the process that is using this port or change the port used for communication in IIS. First, let’s try closing the process that is using port 80 or 443.

  1. Press Windows + R and type cmd.
  2. Press Ctrl + Shift + Enter. This will open the command prompt as admin.
    open command prompt file in use by another process
  3. Type netstat -ano | findstr :80 and press Enter.
    process using port 80
  4. If it displays any result, note the PID. The PID is the number at the end.
  5. Now, open the Task Manager and go to the Details tab.
  6. Search the PID that you noted in step 4.
  7. Right-click on this process and select the End task.
    end process using port 80
  8. Again type netstat -ano | findstr :443 and press Enter.
  9. Now, follow Steps 4 through 7.

Change IIS Default Port

If that does not work or if you cannot stop the process that is using the port, try using another port to host the website from IIS.

  1. Open IIS.
  2. On the left panel, expand the item at the top of the list.
  3. Double-click on Sites.
  4. Right-click on the Default website and select Edit Bindings.
    edit binding file is use by another process
  5. Select a hostname and click on Edit.
    edit port file cannot be accessed
  6. If it is using port 80, change it to 8081 and if the website is using port 443, change it to 8443.
    change http port file in use by another process
  7. Click on OK.
  8. Close the dialog box and try to start the default website.
  9. If you are still getting the same error message, you need to change registry settings so that IIS uses the default HTTP address.

Use Default HTTP Address

For IIS to use the default address, you need to change a few registry values. Changing the wrong settings in the registry could cause system instability and sometimes may even cause more problems than before. So make sure that you back up the registry first.

  1. Open Command Prompt as admin.
  2. Type net stop HTTP and press Enter.
  3. Press y and press enter when it asks for confirmation.
    stop http service file in use by another process
  4. Now, open Run.
  5. Type regedit and press Enter.
    open regedit file in use by another process
  6. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\ListenOnlyList
  7. If there is no entry named ListenOnlyList, the system is using the default HTTP address.
  8. If you see an entry named ListenOnlyList, right-click on the IP address with value other than 0.0.0.0 and select Delete.
    delete ip address file in use by another process
  9. Click Yes.
  10. Delete all other IP addresses except 0.0.0.0
  11. Again Open the Command prompt in Elevated mode.
  12. Type net start HTTP and press Enter.
fix
Deep Shrestha
  • Twitter
  • LinkedIn

Deep Shrestha works as a computer hardware writer at TechNewsToday with several hardware and programming certifications. Although he has been writing technical content for more than a year, his interest in hardware components started at a very young age ever since he heard about PC building. Pursuing his passion, he has assembled several desktop computers. Besides building desktop PCs, Deep also has hands-on experience fixing software and hardware issues on laptops and desktop computers. Using all this knowledge and skills about computer hardware, he's on a quest to make content that's easy to read and understand for everyone. You can contact him at deep@technewstoday.com

Related Posts

how to turn off hardware acceleration

How to Turn Off Hardware Acceleration

September 22, 2023
what happens if you turn off your computer during an update

What Happens if You Turn Off Your Computer During an Update?

September 18, 2023
How to Disable Integrated Graphics

How to Disable Integrated Graphics?

September 16, 2023
System Restore Stuck

How To Fix Windows Stuck on System Restore

September 16, 2023
startup-repair-couldn't-repair-your-pc

How To Fix “Startup Repair Couldn’t Repair Your PC”

September 13, 2023
how to free up ram

How to Free Up Memory

August 4, 2023
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
how to turn off hardware acceleration

How to Turn Off Hardware Acceleration

September 22, 2023
motherboard chipset

Understanding Motherboard Chipset and Its Importance

September 20, 2023
Naval-Warfare-Games

Best Naval Warfare Games

September 18, 2023
You may also like
printer-not-printing

How to Fix a Printer That’s Not Printing

September 20, 2023
Share Location With Friends and Family

Share Location With Friends and Family (iPhone and Android)

September 18, 2023
how-to-print-without-a-printer

How to Print Without a Printer

September 18, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook Twitter Pinterest
  • Home
  • About Us
  • Our Team
  • Editorial Guidelines
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

Type above and press Enter to search. Press Esc to cancel.