netsh error: The process cannot access the file because it is being used by another process

1

It is a server running Windows Server 2016 Essentials. Intuit, in all their infinite wisdom, wanted me to run this command on our file server:

netsh int ipv4 add excludedportrange protocol=udp startport=55368 numberofports=5

The error message I get back is:

The process cannot access the file because it is being used by another process.

So does anyone know what file are we talking about and what process might have it opened?

Refurb

Posted 2018-06-11T20:48:20.987

Reputation: 66

Answers

0

That command appears to be trying to add exclusions to the dynamic port range for Windows and apps.

Did you try running it as Administrator? (You can type CMD into the Windows search on the Task Bar, and then right-click on the CMD icon and hit "Run as Administrator.")

I would recommend simply disabling the Windows Firewall and testing it to see if that solves the issue --- then build back up your security and port exclusions from there.

Your Computer Genius

Posted 2018-06-11T20:48:20.987

Reputation: 13

Well..... that is how I ran it at the command prompt (as administrator). According to Intuit one of their services running on the server and Microsoft's DNS Server are using the same port and this command was supposed to exclude the range in question from being used. Since both services are running on the same server I wouldn't think it should mess with the firewall should it? – Refurb – 2018-06-11T21:07:39.880

Right.... Ok, did you have the Microsoft DNS Server stopped at the time you ran the command? It would need to be stopped and then restarted after the command has executed successfully (at which point, presumably, it would start on different ports). – Your Computer Genius – 2018-06-11T21:24:53.410

Haven't tried it yet but their instructions do say to stop both services before issuing the command. I am just very curious as to what and where this file is just in case the command does something detrimental and I need to reverse it by editing the file. – Refurb – 2018-06-12T14:32:32.720

The command just removes ports from the dynamic range that Windows will use.

You should be able to craft a netsh command that reverses it. See https://support.microsoft.com/en-us/help/929851/the-default-dynamic-port-range-for-tcp-ip-has-changed-in-windows-vista

– Your Computer Genius – 2018-06-12T19:49:56.550

0

That error happens if you have already excluded those ports. Confusing error message I know.

Check what you have already using netsh int ipv4 show excludedportrange protocol=udp

Dan Buhler

Posted 2018-06-11T20:48:20.987

Reputation: 167

-1

I was having the same trouble (with the goal of clearing a conflict between DNS and QuickBooks). In the end what seems to have worked was, instead of setting an exclusion range, to set the range to a completely different range.

I used the following commands and, at least so far, it seems to be working.

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

Hinson Stephens

Posted 2018-06-11T20:48:20.987

Reputation: 1