A DOS Batch script to remove all shares and disable auto shares on Windows systems. 'Disable auto shares' task is to prevent the creation of administrative shares and 'Remove all shares' task is to delete hidden, administrative and classic shares via the Win32_Share class.
Tested on :
- Windows XP
- Windows Vista 32 bits & 64 bits
- Windows 7 32 bits & 64 bits
- Windows 8 32 bits & 64 bits.
- Administrative rights.
- WSH (Windows Script Host) : Open a command prompt and type
wscript
to check.
- Download and run
shares-erasor.bat
. - Task 1 : Disable auto shares. To prevent the creation of administrative shares.
- Task 2 : Remove all shares. To delete hidden, administrative and classic shares via the Win32_Share class.
- Task 3 : Run task 1 and 2.
LGPL. See LICENSE
for more details.