RemoveDefaultShares
Copyright © 2002 Douglas E. Jeffries.
|
By default Microsoft Windows XP shares all your hard drives as C$, D$, etc. and your windows directory as ADMIN$, with only your administrator password(s) protecting it.
Since many people do not rename the Administrator username, and this account probably will not be disabled even if someone attempts to guess all possible passwords over the Internet, this is clearly not secure. Microsoft Windows makes it inconvenient to disable these shares without disabling sharing completely. Few users would be able to determine these steps.
There are two ways to stop this behavior: disable shares temporarily (until the next reboot) or stop it from happening in the first place. I wrote RemoveDefaultShares to automate the process of unshare them one-by-one. This is the temporary solution, so they still get re-shared at reboot, but running this program again will turn them off.
|
How to permanently remove the default shares in Windows XP
- Download RemoveDefaultSharesPermanently.reg. If you are comfortable with the Windows Registry, you could instead simply open regedit yourself, and set the two keys listed below to zero.
- Double-click the downloaded file to merge its changes into your registry. It will set two DWORD (numeric) values to zero:
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AutoShareServer
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AutoShareWks
- If you need to change it back, simply edit the .reg file in notepad, changing the values to 1 instead of 0, and double-click it again.
|
Alternatively, use my program to turn off the default shares one time (until reboot)
|
RemoveDefaultShares is available as a ZIP archive containing a readme file, the executable file, and the source code.
Download RemoveDefaultShares.zip (10,823 bytes)
Read the file readme.txt contained in the ZIP archive for important information and terms of use.
|
Installation
|
RemoveDefaultShares.exe is all you need to run RemoveDefaultShares. Simply copy it to your computer and run it whenever you want to stop sharing your disks.
|
Implementation
|
RemoveDefaultShares is written in the C programming language and utilizes the Windows API to enumerate and delete shares.
|
|