Samba shares remain after removal of HDD containing shared folders - Windows XP

By VvWolverinevV
Jan 26, 2008
Topic Status:
Not open for further replies.
  1. I recently removed a secondary HDD from my old Windows XP machine. However, I did not remove sharing from several folders on the HDD before physically removing it. Now, when I access the shares from that computer, I still see the folders that are on the removed HDD (but obviously I can't open them). Where is the listing of shares stored in Windows XP? How can I remove these shares?
  2. jobeard

    jobeard TS Ambassador Posts: 13,010   +218

    try opening My Network Places, and deleting them from there.

    also might try My Computer, select the Share and then Disconnect
  3. VvWolverinevV

    VvWolverinevV TechSpot Enthusiast Topic Starter Posts: 120

    They don't appear in My Network Places.

    I assume you're talking about My Computer on the computer broadcasting the empty shares. I am unable to locate the shares anywhere on that computer. That's exactly the point of my original post.
  4. jobeard

    jobeard TS Ambassador Posts: 13,010   +218

    one more place
    cp->Admin Tools->Shared Folders:
    right click sharedFolderName and Stop Sharing

    edit:
    might look in the registry;

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\lanmanserver\Shares
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\lanmanserver\Shares\Security

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\lanmanserver\Shares
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\lanmanserver\Shares\Security

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\Shares
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\Shares\Security

    HKEY_USERS\S-1-5-21-329068152-602609370-725345543-1007\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2

    find the share on the right panel and DELETE the key
  5. VvWolverinevV

    VvWolverinevV TechSpot Enthusiast Topic Starter Posts: 120

    :grinthumb That's it! In XP Home, it's Control Panel> Administator Tools> Computer Management, and then Shared Folders/Shares is in the Console Tree. I could see all of the empty shares that I wanted to get rid of listed here; however, "Stop Sharing" was not in the context menu for those shares. I was able to remove all but one share via the DOS prompt with the following command:
    Code:
    net share <sharename> /delete
    where <sharename> was the name of the share removed.

    The last share had a space in the name, which was problematic for the DOS prompt. For this share, I removed the corresponding keys from the registry paths
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\Shares
    and
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\Shares\Security

    After restart, all of the shares were gone!
    Thanks jobeard!
  6. jobeard

    jobeard TS Ambassador Posts: 13,010   +218

    you're welcome & thanks for the feedback -- it may help someone else one day :)
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.