Question

Q: Unable to reset WinSock, can't delete WinSock2 key from registry

Original Title: Can't reset Winsock

I'm working on a Windows 7 PC, connected to a DSL modem through a router. Other computers can connect to the router, both directly (wired) and through wireless. 

This computer did have a firewall issue, in that the firewall was not running and couldn't be turned on nor restored to "suggested settings" through Windows. I was able to get the firewall fixed, but now I find that the Winsock is apparently corrupted.

If the "netsh winsock reset" command is issued from an elevated command prompt, the command prompt window just hangs (for as long as 24 hours). In the registry, I can't run "netsh winsock reset catalog" either, as it also hangs.

I can delete the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock key, but not the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock2 key. An error message is givenL

"Cannot delete WinSock2: Error while deleting key."

Therefore, I can't reinstall the TCP/IP protocol in the network properties.

I can provide more details later, if needed, when I get back to the PC.

Added:

   Dell Optiplex 745

   Intel #### Dual core CPU, 3.40 GHz

   2 GB RAM

   Broadcom NetXtreme 57xx Gigabit onboard NIC

   (also tried T-LINK TL-WN823N wireless USB adapter)

   WIndows 7 Home Premium, 32-bit, SP 1

Can anybody give me directions to manually reset Winsock, remove the offensive key or otherwise repair the corrupted Winsock?

Thanks!

CR



* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

Hello Craig,

Welcome to Microsoft Community Forum.

As per the description, I understand that you are not able to reset corrupted WinSock on your computer, running reset WinSock command cause the command prompt to hang. Deleting WinSock2 key in registry fails with the error message “Cannot delete WinSock2: Error while deleting key.

I would appreciate if you can provide us the following information to help us understand the issue better.

  • Does the signed in user have admin permissions on the machine?

This is normally caused by the currently logged in user not having permissions to modify or delete the key. Some keys will not allow any user to modify or delete them. Editing registry key permissions may help us to get this key deleted and Reset WinSock.

Follow the steps below to edit registry key permissions.

  1. In the Registry editor, right-click on the WinSock2 key and choose Permissions.
  2. On the permissions screen, verify that Everyone is present in the “Group or user names” list.
  3. If Everyone is not present, click on Add.
  4. Type Everyone into the “Enter the object names to select” box.
  5. Click the Check Names button.
  6. Once Everyone is underlined, click Ok.
  7. Click on the Everyone entry so that it is highlighted.
  8. In the lower window, place a check into the Full Control row under the Allow column.
  9. Remove any checkmarks in the Deny column.
  10. Click Ok.
  11. Proceed with deleting the WinSock2 key and check if that works.

Registry disclaimer: To do so: Important this section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: http://support.microsoft.com/kb/322756/en-us              

Hope this helps. Please let us know the results. Feel free to write us back for any further assistance, we’ll be glad to assist you.

Regards,
Mann Manohar

Did this solve your problem?

Sorry this didn't help.


Thanks for the suggestion, Mann.

I tried your performing the steps this afternoon, when I was finally able to get back to the computer. Yes, the user logged in is an administrator. "Everyone" was already in the user list in the Permissions for the WinSock2 key and the Permissions for Everyone was already set to Allow the "Full Control" access to the key, although the Read function was set to Deny access. I removed the chckmark from the box and applied the setting. However, access to the key (to delete it) was still unsuccessful, resulting in the same error message.

For what it was worth, I tried creating a brand new Administrator account, logged in as that user, checked the Permissions in the registry editor and tried deleting the key again, still without success.

Thanks.

Craig

Did this solve your problem?

Sorry this didn't help.


Hello Craig,

Thank you for your reply.

Sometimes this kind of unexpected behavior shown by Windows due to some missing or corrupt important system files. I would suggest you to rum Microsoft Safety Scanner SFC /SCANNOW to scan the system integration and fix system file corruption (if any).

The sfc /scannow (System File Checker) command scans all protected system files, and replaces incorrect versions with correct Microsoft versions.

Use the System File Checker tool to troubleshoot missing or corrupted system files.
http://support.microsoft.com/kb/929833/en-us

Please let us know the results. Feel free to write us back for any further assistance, we’ll be glad to assist you.

Regards,
Mann Manohar

Did this solve your problem?

Sorry this didn't help.


Hi, Mann,

Thanks again for your reply and your suggestion.

I had tried running SFC /SCANNOW before making my original post. Unfortunately, it was no help.

In lieu of other suggestions, I am considering trying to edit the Windows registry and attempting to remove the WinSock2 key by booting into Ubuntu (Linux) on a bootable USB flash drive. If that (or additional suggestions offered) don't work, I think about the only thing left is to just restore the system to "factory condition" and reload the programs and files...

Thanks,

Craig

Did this solve your problem?

Sorry this didn't help.


Hello Craig,

Thank you for keeping us updated on the status of the issue.

Before making a decision to restore the system to factory condition, I would suggest you to run the following Microsoft Fixit and check if that helps you to reset TCP/IP.

Since command prompt hangs while running “netsh windock reset” command you might not be able to try manual steps but fixit may help.  

How to reset TCP/IP by using NetShell utility?

http://support.microsoft.com/kb/299357/en-us

Hope this works. Please let us know the results, feel free to write us back for any further assistance, we’ll be glad to assist you.

Regards,
Mann Manohar

Did this solve your problem?

Sorry this didn't help.


Hey, Mann,

Thanks again for your reply and suggestion.

I tried both resetting TCP/IP manually and with FixIt and neither helped.

Unless I hear back from you quickly, I guess I'll try my possible resolution of editing the Windows registry by booting into the Linux flash drive TOMORROW MORNING.

Thanks,

Craig

Did this solve your problem?

Sorry this didn't help.


Hello Craig,

Thank you for your reply and apology for the delayed response.

In case if you are yet to try your way of editing registry through Linux and issue persists, let’s enable Windows hidden built-in administrator account and try to delete Winsock2 from there.

Follow the steps below to enable hidden built-in administrator account.  

  1. Type cmd in the search box within Start screen and right click on the Command Prompt.
  2. Select Run as administrator. (Put the administrator password to proceed if it prompts you for the password).
  3. Type the following command to enable built-in admin account:
    net user administrator /active: yes
  4. Close Command prompt and select Continue to Windows.

Proceed with taking registry backup and deleting the WinSock2 key and see if we are able to.

After successfully making required changes, open command prompt once again and run the following command to disable built-in administrator account.

net user administrator /active: no

On addition to that, I would also suggest you to update NIC (Network Interface Card) driver.

Hope this works. Please reply with the results, we’ll be glad to assist you.

Regards,
Mann Manohar

Did this solve your problem?

Sorry this didn't help.


Hi, Mann,

Thanks again for your suggestion.

I finally got back to the PC again yesterday. I activated the built-in Administrator account, logged in as the Administrator and attempted to delete the WinSock2 key, but was still unable to do so. So, I logged out and logged back in as another user (with admin rights) and de-activated the Administrator account. I then successfully used the Linux boot USB flash drive to delete both the WinSock and WInSock2 keys, logged back in as a user with admin rights and reinstalled the TCP/IP protocol. I also tried running both the "netsh int ip reset" and "netsh winsock reset" commands. Both commands ran successfully, but online access was still unavailable. Time was short, so I was unable to attempt reinstalling the NIC driver (even though it looked like there was no problem with the currently installed driver) nor attempting any further resolution.

So, the only thing that I"ve accomplished so far is the ability to run the "netsh winsock reset" command without it hanging....

I'd be happy to entertain suggestions for next steps in my effort to resolve the situation.

Thanks,

Craig

Did this solve your problem?

Sorry this didn't help.


Hello Craig,

Thank you for your reply. Appreciate the time taken by you in keeping us updated on the status of the issue.

Glad to hear that you were able to delete WinSock and WinSock2 key and were able to reset TCP/IP. However, you are unable to access internet yet.

I would have you run Windows network troubleshooter again and check if it indicates any more issues with this.

Refer the Microsoft article below:

Wired and wireless network problems.

http://windows.microsoft.com/en-us/windows/network-connection-problem-help#network-problems=windows-7&v1h=win81tab2&v2h=win7tab4&v3h=winvistatab1&v4h=winxptab1

Please reply with the results, we’ll be glad to assist you.

Regards,
Mann Manohar

Did this solve your problem?

Sorry this didn't help.


Hey, Mann,

Thanks again for the reply and suggestion.

I plan to get back to the PC today (Friday, 07/18/2014), but I thought I would drop you a note to let you know that some of the troubleshooting steps are irrelevant to my issue. The wireless network portion of the router works and provides Internet access to other computers (but not the one in question). The problem is specific to the computer in question while using Windows, as I was also able to connect to the Internet on the computer in question just like it is with the computer booted into Linux.

I will report back with my findings.

Thanks,

Craig

Did this solve your problem?

Sorry this didn't help.


* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

 
Question Info

Views: 1,357 Last updated: May 2, 2018 Applies to: