Repairing Damaged Winsock2 in Windows XP
Networking Tips, Registry Tips, Windows XP Tips Posted by Shawn DesRochers November 17th, 2008Many times after a Microsoft Windows update, software install or driver install for one of your PCI devices you end up with a corrupted or damaged Winsock2 file. How can you tell when you have a damaged Winsock2 file you ask?
When you try and run IPCONFIG / ALL, IPCONFIG / RELEASE or IPCONFIG / RENEW and you recieve the following message.
An error occurred while renewing interface ‘Internet’: An operation was attempted on something that is not a socket.
You also may recieve an error message in Internet Explorer with the following error message:
The page cannot be displayed Additionally, you may have no IP address or no Automatic Private IP Addressing (APIPA) address, and you may be receiving IP packets but not sending them.
If you have Microsoft Windows XP with Service Pack 2 installed, there is a one line command you can run to reset the winsock2 registry entries.
netsh winsock reset catalog
There are two easy ways to determine if Winsock2 is damaged:
From the Windows XP source files, go to the Support / Tools directory
Winsock Test Method 1
Run netdiag /test:winsock
The end should say Winsock test ….. passed
Winsock Test Method 2
- Run Msinfo32
- Click on the + by Components
- Click on the by Network
- Click on Protocol
- There should be 10 sections if the Winsock2 key is ok
MSAFD Tcpip [TCP/IP]
MSAFD Tcpip [UDP/IP]
RSVP UDP Service Provider
RSVP TCP Service Provider
MSAFD NetBIOS [\Device\NetBT_Tcpip…
MSAFD NetBIOS [\Device\NetBT_Tcpip…
MSAFD NetBIOS [\Device\NetBT_Tcpip…
MSAFD NetBIOS [\Device\NetBT_Tcpip…
MSAFD NetBIOS [\Device\NetBT_Tcpip…
MSAFD NetBIOS [\Device\NetBT_Tcpip…
If the names are anything different from those in this list, then likely Winsock2 is corrupted and needs to be repaired.
If you have any 3rd party software installed, the name MSAFD may have been changed.
There should be no fewer than 10 sections.
To repair Winsock2
- Go to Start -> Run -> Type: Regedit and click OK.
- Delete the following two registry keys:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock2Or Download The Reg file to delete these entries
- Now Restart the computer
- Go to Network Connections
- Right click and select Properties
- Click on the Install button
- Select Protocol
- Click on the Add button
- Click on the Have Disk button
- Browse to the \Windows\inf directory
- Click on the Open button
- Click on the OK button
- Highlight Internet Protocol (TCP/IP)
- Click on the OK button
- Now Reboot your Computer
Or Download Reg file to add the correct registries back in. Then reboot the computer.
Shawn DesRochers
Found this post useful? Buy me a coffee. Tags: registry, registry repair, TCIP, windows xp, winsock2

If you found this page useful, consider linking to it.
Simply copy and paste the code below into your web site (Ctrl+C to copy)
It will look like this: Repairing Damaged Winsock2 in Windows XP
Related Post

(4 votes, average: 4.75 out of 5)

Says:
February 8th, 2009 at 9:41 am
Of course, what a great site and informative posts, I will add backlink – bookmark this site? Regards, Reader.
Says:
February 9th, 2009 at 4:34 am
It sounds like you’re creating problems yourself by trying to solve this issue instead of looking at why their is a problem in the first place.
Says:
February 16th, 2009 at 10:23 am
Super-Duper site! I am loving it!! Will come back again – taking you feeds also, Thanks.
Says:
April 27th, 2009 at 10:30 am
Hi, I cant understand how to add your site in my rss reader. Can you Help me, please
Says:
February 2nd, 2010 at 4:14 pm
Nice experience