I was curious – is Windows still using the services file for determining which port to use when connecting with a specific protocol, or is it hardcoded in the OS?
I mean, if we type http://test.com/ into Start->Run dialog, will it check the standard IANA services file to check which TCP port to use or will it just assume it’s port 80?
Let’s find out!
I created a standard Windows XP Professional SP2 virtual machine. I downloaded Microsoft Network Monitor for capturing TCP/IP traffic.
I did a simple test, by Going to google.com with IE 7 to check if Network Monitor is working fine – it was:
Then I edited the standard services file and added an extra dummy service with port number 77:
Then I tried accessing the newly created protocol, both by Start->Run and by typing it into IE’s address bar.
Unfortunately, in both cases, there was no TCP traffic initiated.
Windows doesn’t use the standard services file when determining if it knows the protocol, and how to connect to it. This has been verified for Windows XP SP2, but I assume newer version would not switch to the “old” method.