8

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?

4 Answers4

6

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
  • 226
  • 3
  • 4
0

in addition to what Dan has already said, you should also make sure that no app is using that port or else you will get this error.

sh hm
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 20 '21 at 06:34
-1

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.

  • 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? –  Jun 11 '18 at 21:07
  • 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 Jun 11 '18 at 21:24
  • 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. –  Jun 12 '18 at 14:32
  • 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 Jun 12 '18 at 19:49
-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
robinCTS
  • 4,327
  • 4
  • 20
  • 29