Disclaimer: The steps outlined on this page may completely destroy networking on your computer or otherwise damage it beyond repair. I take no responsibility for any damage done to your computer if you follow the steps below. Additionally, the steps following worked for me, but they may not work for you.
I connect to one of my customer’s networks using VPN software. This VPN software only works on Windows but I run Linux on my desktop computer so I use Windows XP with Service Pack 2 running within VMWare to connect and then transfer files to the web server within their network from the Windows XP virtual machine. They recently changed VPN software and previously I could connect to their network but still also connect to computers on my local network (ie my desktop machine) to copy the files to the server. Today I discovered the new VPN software appears to re-route all traffic through the client network so I am no longer able to connect to my desktop machine to copy the files over.
The simple solution would have been to disconnect from the VPN, copy the required files from my Linux host to the Windows desktop, then reconnect and copy the files over. I decided this would be a pain having to do this all the time, so first tried playing with the routing rules using the “route” command line tool. None of my routing rules worked, so I decided instead to try adding another virtual ethernet adapter using a different subnet. So I shut down Windows, edited the VMWare config to add the new adapter and then booted back into Windows.
That’s when the trouble started…
It took ages to log in, and I’d be left with a blank desktop. The only way I could get programs to run would be to Ctrl+Alt+Delete to get the task manager running and then click the “Run” button to run the command line, explorer, control panel etc. Eventually, on some reboots, I would get my desktop back again. After a few minutes I’d get a message from the McAfee security center which runs on this Windows machine saying it could initialise, or something like that (unfortunately I didn’t bother to write down the error message). And networking also wasn’t working any more.
Deciding it must be an issue with the McAfee software, I decided to uninstall it. However, on reboot I was still experiencing the same issues and networking still wasn’t working. After a lot of messing around, removing the adapters in VMWare and adding them back again, rebooting into safe mode without networking, safe mode with networking, etc networking was still completely broken.
I used the steps outlined by Microsoft to reset TCP/IP but that didn’t work. I also tried a 3rd party utility to reset TCP/IP and Winsock but that also didn’t work. I tried uninstalling all the networking protocols in the network connection manager (except for TCP/IP because it won’t let you) and then reinstalling them and that didn’t work either.
At this point, running “ipconfig” or “ipconfig /all” didn’t return anything at all, and trying to ping anything returned this error: “unable to initialize windows sockets interface, error code 0”. If I tried to repair the network connect I got the message “failed to query TCP/IP settings of the connection”.
After a considerable amount of time Googling, I found this post which finally got my networking going again. As I mentioned in the disclaimer at the top of the page, following these steps might totally break your computer and networking, so proceed with caution. I knew it could really stuff things up, but my virtual machine was already in big trouble and I did have a backup copy of the virtual machine from 6 weeks ago I could revert back to if I really had to.
So first up, restart Windows into Safe Mode with Networking. To get there you need to hit F8 when it’s booting up but you need to do it before the Windows logo appears. If the logo has appeared then you’re too late and will need to reboot again.
Once you’re in safe mode, edit your registry (Start button, run, regedit). Locate and delete the following keys completely:
Open c:windowsnettcpip.inf and find the [MS_TCPIP.PrimaryInstall] section. It will look something like this:
[MS_TCPIP.PrimaryInstall] ; TCPIP has properties to display Characteristics = 0xA0 ; NCF_HAS_UI | NCF_NOT_USER_REMOVABLE AddReg = Registry.MS_TCPIP.PrimaryInstall, Registry.MS_TCPIP, Registry.MS_TCPIP.Legacy RegisterDlls = MS_TCPIP.Register
Characteristics = 0xA0 to
Characteristics = 0x80 and now it will look like this:
[MS_TCPIP.PrimaryInstall] ; TCPIP has properties to display Characteristics = 0x80 ; NCF_HAS_UI | NCF_NOT_USER_REMOVABLE AddReg = Registry.MS_TCPIP.PrimaryInstall, Registry.MS_TCPIP, Registry.MS_TCPIP.Legacy RegisterDlls = MS_TCPIP.Register
Open the network properties of the connection you need to fix. In the General tab, click the Install button, select “Protocol” then click the “Add” button. Click the “Have Disk” button, enter “c:windowsinf” in the text box and hit enter (the OK button remains greyed out but hitting enter works). Now select “Internet Protocol (TCP/IP)” and click OK. Note that you do not want “Microsoft TCP/IP version 6” – the one you need should be at the bottom of the list.
Now that you’ve done all this, you can uninstall TCP/IP in the network properties dialog. So go back to the network properties, scroll down to “Internet Protocol (TCP/IP)” and click the uninstall button. If you have Simple TCP/IP services installed you’ll need to uninstall them first (the dialog will tell you this). To do this you need to shut the network properties dialog down, then go to the Control Panel, select “Add or Remove Programs”, “Add Remove or Windows Components”, select “Network Services”, click “Details”, uncheck “Simple TCP/IP Service”, then ok etc.
My machine skyrocketed to 100% CPU usage after I tried to uninstall TCP/IP and nothing seemed to happen. I let it continue not doing much for about half an hour and then tried Ctrl+Alt+Delete to bring up the Task Manager but everything was pretty unresponsive. So I hit the power off button and then booted up again.
Despite me pulling the plug, TCP/IP was removed when Windows started up again so I was able to reinstall it using the steps above (from “Open the network properties of the connection you need to fix”). On reboot networking was all working nicely again, so I was able to install two network adapters, reinstall McAfee and I was ready to go again.