How to disable administrative shares in Windows

You can remove administrative shares by running for example net share c$ /delete, however the shares will be recreated when you reboot. To fully disable them, delete them, stick the following in a new reg file (for example disable_admin_shares.reg) and run it. When you reboot now they shouldn’t come back :)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters]
"AutoShareWks"=dword:00000000

You can also do it manually by running regedit and setting that key yourself, but who wants that…