Manually delete file shares in Windows 2000

Most users and admins manage file shares in Windows 2000 manually -- meaning they keep a running mental list of what's shared and what's not, and work from that. Sometimes an admin or user will delete a folder that has an active file share on it, and ignore the warning that Windows provides when this is done.

Not only does this log an error -- Event 2511 -- but under some conditions the share itself isn't removed, and will continue to throw an error whenever the system is restarted or that user logs back in. If the share is persistent despite the folder being deleted, the system will try to re-share the nonexistent folder again and again, and throw the same error each time.

There are a few ways to keep this from happening.

  1. Remove the share from the Shared Folders section of Computer Management.

    Right-click on My Computer, select Manage, and then select Shared Folders | Shares. A list of all folder shares is presented there. You can delete any of the shares by right-clicking on the folder in question and selecting Stop Sharing. (Note that any shares that end in a dollar sign -- $ -- are shared out by the system by default and should not be removed unless you know what you're doing.)

    If the share in question doesn't show up in Shared Folders, you may need to delete it manually from the Registry.

  2. Remove the share from the Registry.

    Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares. The shares on the system should be listed there as String entries, so delete the offending entries and reboot. Once again, be sure not to delete automatic shares as they can have adverse side effects unless you know what you're doing.

Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter.

This was first published in January 2003

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.