Here, this is what we would do at my tech support company if a caller had this problem...
SYMPTOMS
When you attempt to verify your network configuration by using the TCP/IP Ping.exe command-line utility (Ping Localhost or Ping 127.0.0.1), you may receive the following command-line error message:
PING: transmit failed, error code 10091
You may not be able to connect to (ping) another local computer or another computer on the local network or on the Internet.
CAUSE
This issue can occur if an incorrect Windows Sockets dynamic link library (DLL) file is in the current path or there is more than one simultaneous Windows Sockets implementation. If there is more than one Winsock.dll file on your computer, be sure the first one in the path is appropriate for the network subsystem currently loaded.
This issue can also occur if the Windows Sockets implementation is not currently installed or is configured incorrectly.
RESOLUTION
To resolve this issue, remove and then reinstall your networking components. To do this, follow these steps.
NOTE: You must have your Microsoft Windows CD as well as driver disks for the dial-up adapter (if present) and the network adapter (if present) to complete these steps.
Step 1: Remove Networking Components and Dial-up Networking
Step 2: Remove Network Registry Keys
On the taskbar, click Start, and then click Run.
In the Open box, type Scanregw, and then click OK.
The Windows Registry Checker starts. A message similar to the following appears:
No errors found.
The system registry has been backed up already today.
Would you like to back it up again?
Click Yes. You receive a message stating that backup is complete. Click OK.
On the taskbar, click Start, and then click Run.
In the Open box, type Regedit, and then click OK.
In Registry Editor, expand the following subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock
Right-click Winsock, and then click Delete on the shortcut menu that appears.
The following message appears:
Are you sure you want to delete this key?
Click Yes.
Follow steps 6 through 8 to remove the following registry subkeys:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock2
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\RemoteAccess\Authentication\SMM_Files
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\AFVXD
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\DHCP
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\Winsock
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\Winsock2
Quit Registry Editor.
Restart the computer.
Step 3: Reinstall Networking Components and Dial-up Networking