I had several shared folders on my Windows 7 Home Premium (64-bit) system. Some of these folders no longer exist as they were located on a disk which I no longer use. Windows, however, still acts as though they exist, thus they still appear in the list of shares. I would like to remove these shares, but the system will not allow it.

After disabling the Share Wizard, I opened the "Shares" pane in Computer Management and found that the "Stop Sharing" option mentioned on many websites was not listed as an option for any of my ongoing shares, even the ones that still exist. My attempt to stop the share from the command line was also a failure. Using the command net share <sharename> /delete I received the error message "System error 3 has occurred. The system cannot find the path specified." Both of these actions were run with administrator privileges.

Is it possible to remove these shares without reconnecting the disk that contains the folders? Thanks in advanced for your help.

  • A directly attached disk wouldn't be a network share. Where exactly are you seeing this "list of shares"? – Ƭᴇcʜιᴇ007 Nov 30 '14 at 2:24
  • The disk contained certain folders that I did set as network shares. When the disk was plugged in, those folders would be available to other computers in the workgroup just as any other share would be. The list of shares was the one in Computer Management (compmgmt.msc) > Shared Folders > Shares – Kyle Nov 30 '14 at 2:33
  • Oh, so these aren't maps to shared folder on the disk, they're entries that the computer is sharing the folder to other computers. Gotcha! – Ƭᴇcʜιᴇ007 Nov 30 '14 at 2:35
  • answers.microsoft.com/en-us/windows/forum/windows_7-performance/… Check the second answer down. Does that help? – Ƭᴇcʜιᴇ007 Nov 30 '14 at 2:39
  • Montanaguy's answer looked promising, but I do not have the "Share with" menu that he mentioned, nor any other share-related options, for any of the share folders. I'm tempted to follow DahHerpDerp's instructions and just assign the appropriate path to some random USB stick and folder, but I'll wait a while longer to see if a more elegant solution can be found. – Kyle Nov 30 '14 at 3:09

Delete share:

reg delete "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares\Security" /v "<Share Name>" /f
reg delete "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares" /v "<Share Name>" /f

Restart File and printer sharing:

net stop LanmanServer /Y
net start LanmanServer /Y

view depend service:

sc EnumDepend LanmanServer | more

start service if need.

  • This process removed all of the "broken" shares at once, not one-at-a-time as I was expecting. That behavior seems a bit unusual to me, but it might just be the way Windows works. Oh well. The shares are gone, mission accomplished. Thanks. – Kyle Nov 30 '14 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.