# How to permanently remove Hidden Shares (C$, ADMIN$)?



## thePITman

I can currently remove the Hidden Shares on my Windows XP Pro computer by going to Start > Run > "cmd" > "net share C$ /d" to delete the C$ and likewise for ADMIN$. However, it regenerates after I reboot the machine. How can I permanently remove it? I have tried creating the "AutoShareServer" item in the registry, rebooted, and followed all the isntructions, but it did not work for me. Any step-by-step instructions would be great. Thanks!


----------



## Cellus

Long story short you can not permanently delete administrative shares - they will automatically regenerate whenever the service restarts or you reboot. You can however add a script to delete the shares when logging on or starting up.

The Microsoft Script Center, in all its nifty uses, has an article regarding this:

http://www.microsoft.com/technet/scriptcenter/resources/qanda/dec05/hey1219.mspx


----------



## thePITman

Thanks, Cellus. I will try using that.

I had found this link:
http://articles.techrepublic.com.com/5651-6242-5164911-1.html
But again, it talks about the registry editing which did not work for me. I have yet to try installing that file off the Windows boot CD, but it doesn't sound like it's going to work.


----------



## johnwill

Please don't post multiple threads on the same topic. I've answered the other thread.


----------

