Home  >  Article  >  Process cannot access file error fix on Windows 11/10

Process cannot access file error fix on Windows 11/10

WBOY
WBOYforward
2023-05-12 19:10:042195browse

As we all know, when any file is in use, no other process can access/change it. In this case, when a process attempts to open a file, the operating system locks the file to prevent it from being modified by another process.

"The process cannot access the file because it is in use by another process" is such an error message observed by many users on their Windows computers. This error is known to occur in different versions of Windows OS and Windows Server. Usually, this error message is observed during usage of Netsh command on the user’s Windows PC. Another situation where this error occurs is when trying to open any service or website in the Internet Information Services (IIS) Microsoft Management Console (MMC) snap-in.

Are you seeing this error message on your system? Then you've found the right position. In this article, we have put together a series of troubleshooting strategies that can help users facing this error successfully resolve the issue on their Windows PC.

Solution 1 – Close all unnecessary background processes

One of the most basic troubleshooting methods to resolve this error is to close all unnecessary background processes running on your PC via Task Manager process.

1. Open the Task Manager by pressing the Ctrl Shift Esc keys on the keyboard simultaneously.

2. Go to the Processes tab in Task Manager.

3. Here, select the unnecessary processes running in the background of your PC one at a time.

Then, click the End Task button.

进程无法访问 Windows 11 / 10 上的文件错误修复

Do this for any unnecessary applications you can see in Task Manager.

Note: Make sure you do not end processes related to Windows and Microsoft services.

4.Restart your computer.

After the system boots, try performing the task that caused the problem to check if it has been fixed.

Solution 2 – Run the application as administrator

If you encounter an error when trying to execute the netsh command in the terminal, it is likely that the command requires administrative privileges to run and make modifications. Therefore, before running the command, make sure that the command prompt window you are using has administrative rights.

1. Use the Windows R key combination to open the Run dialog box.

2. Type cmd in the run box.

Then, just hold down the Ctrl Shift Enter keys simultaneously to run Command Prompt as administrator.

进程无法访问 Windows 11 / 10 上的文件错误修复

3. When the User Account Control prompt appears to grant permissions, click the Yes button.

4. Now, try executing the command in the command prompt and check if the error is resolved.

Solution 3 – Modify IP Range

This error may occur if some processes on the system are using port 80 or port 443. Many users have been able to resolve this conflict by setting up a completely different IP range.

1. Click the Windows key on your keyboard and type the text Command Prompt in the search box.

After selecting Command Prompt in the search results, click on the right to run as administrator .

进程无法访问 Windows 11 / 10 上的文件错误修复

#2. After opening the command prompt with administrator rights, type the following commands in sequence, and press EnterChange the IP range of TCP and UDP ports.

netsh int ipv4 设置动态端口 tcp start=10000 num=1000netsh int ipv4 set dynamicport udp start=10000 num=1000

进程无法访问 Windows 11 / 10 上的文件错误修复

#3. Check if this helps resolve the issue you are facing. If the problem persists, move on to the next solution below.

Solution 4 – Resolve the IIS port conflict by changing the registry

To resolve the IIS port conflict, you need to run the Netstat.exe utility to determine if there is any other activity on port 80 or port 443 connect. This error message may occur as described below: The

  • registry subkey ListenOnlyList is configured incorrectly on the computer that is running IIS.
  • Port 80 and port 443 required by IIS are used by another process.

After using the Netstat.exe utility, if you see no active connections to the above ports from other processes, you need to check the ListenOnlyListregistry subkey configuration.

1. Use the Windows and R key combination on your keyboard to open the Run box.

Type cmd and run Command Prompt with administrator privileges by pressing Ctrl Shift Enter key simultaneously .

进程无法访问 Windows 11 / 10 上的文件错误修复

当用户帐户控制提示时单击是。

2. 键入以下命令并按Enter以运行 Netstat.exe 实用程序。

netstat -ano

上面的命令返回一个活动连接列表。

进程无法访问 Windows 11 / 10 上的文件错误修复

滚动浏览此列表并检查端口 80 和端口 443 是否正在被任何其他进程使用。

如果上面提到的端口没有被积极使用,那么您需要对注册表中的键进行更改。

3. 在对注册表进行任何修改之前,您需要停止运行 IIS 的 HTTP 服务。

在命令提示符下键入命令,然后按 Enter。

网络停止http

4. 当你被问到你想继续这个操作吗?,键入Y并按Enter继续。

禁用 HTTP 端口后关闭命令提示符。

进程无法访问 Windows 11 / 10 上的文件错误修复

5. 点击键盘上的Windows键并在 Windows 搜索栏中键入注册表编辑器。

单击注册表编辑器。

进程无法访问 Windows 11 / 10 上的文件错误修复

如果UAC提示您授予权限,请单击是。

6. 在注册表编辑器窗口中,导航到下面的位置或将其复制并粘贴到注册表的导航栏中。

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

注意:如果没有找到ListenOnlyList子项,则无需创建子项,因为将使用默认 IP 地址0.0.0.0

进程无法访问 Windows 11 / 10 上的文件错误修复

7. 现在,您需要移到右侧并删除除默认值0.0.0.0以外的所有 IP 地址

右键单击每个IP 地址并选择删除选项。

进程无法访问 Windows 11 / 10 上的文件错误修复

在弹出的确认删除子项的窗口中,单击是。

进程无法访问 Windows 11 / 10 上的文件错误修复

8. 退出注册表并重新启动计算机。

9、系统启动后,需要启动HTTP服务。

如上所示启动命令提示符。

键入下面的命令,然后按 Enter。

网络启动http

10. HTTP 服务启动后,尝试运行 IIS(Internet 信息服务)并检查错误是否已解决。

进程无法访问 Windows 11 / 10 上的文件错误修复

The above is the detailed content of Process cannot access file error fix on Windows 11/10. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yundongfang.com. If there is any infringement, please contact admin@php.cn delete