Saturday, October 16, 2010

How to reinstall WAN Miniport on Windows XP

So you have network connection issues, you've Googled for answers, and ended up deleting the WAN Miniport devices from device manager. And you can't add them back. This was exactly the problem I encountered when I tried to fix a virus infection that screwed up a network driver.

Attempts to reinstall the devices failed to fix the problems, and you can't even uninstall them from device manager. Googling for information turned up ways to remove the devices, but you find you can't add the devices back afterwards.

I found a site that documented how to reinstall those devices but seeing as how I can't seem to find it again I thought it best to document the steps here while I still remember:

First, you'll need to download devcon.exe from Microsoft. It's in a self-extracting package of the same name so be sure to extract it first before attempting to use it.

Next, open up C:\Windows\inf\netrasa.inf with your favorite text editor. Notepad should do just fine. Device IDs for the various virtual network devices are in this file. You'll need the Device IDs to know what to install.

In my case I had to reinstall the following (Device ID in bold):

- WAN Miniport (IP) MS_NdisWanIp
- WAN Miniport (PPPOE) MS_PppoeMiniport
- WAN Miniport (L2TP) MS_L2tpMiniport
- WAN Miniport (PPTP) MS_PptpMiniport
- Direct Parallel MS_PtiMiniport

Finally, the actual install step. Run this from console:

:\> devcon.exe install c:\windows\inf\netrasa.inf device_id

Be sure to replace device_id with the actual Device ID as found in netrasa.inf. For example, replace device_id with MS_PppoeMiniport is you want to reinstall the PPPoE miniport like this:

:\> devcon.exe install c:\windows\inf\netrasa.inf MS_PppoeMiniport

It should only take a moment and your device will be reinstalled. Good Luck.