Hiding local drives using batch files

I want to be able to hide all local fixed drives (usually only C:) using a routine in a batch file.

Im currently running WIN2000 Advanced server as a domain controller but if i can help it i want to keep as much as possible in batch files so i can easily port them to other networks if possible and for some reason finding how to hide a local drives seems to elude me :(

Any help is appreciated
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You want to hide the drives from showing up where?  
Batch information on the web...

http://www.maem.umr.edu/~batch/ - Ted Davis' page
http://www.pressroom.com/~tglbatch/ - Tom Lavedas' page
http://www.calweb.com/~webspace/batch/ - Eric's page
http://www.nc5.infi.net/~wtnewton/batch/ - Terry's page
http://purl.oclc.org/net/dirk/batcoll.all - Dirk's bat techniques
http://bigfoot.com/~batfiles/ - Laurence Soucy's page

If you want to stop a drive or any combination of drives appearing in Explorer/My Computer
Add the Binary Value of 'NoDrives' in the registry at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Give it a value from a combination of the table below:
A: 01 00 00 00
B: 02 00 00 00
C: 04 00 00 00
D: 08 00 00 00
E: 10 00 00 00
F: 20 00 00 00
G: 40 00 00 00
H: 80 00 00 00
I: 00 01 00 00
J: 00 02 00 00
K: 00 04 00 00
L: 00 08 00 00
M: 00 10 00 00
N: 00 20 00 00
O: 00 40 00 00
P: 00 80 00 00
Q: 00 00 01 00
R: 00 00 02 00
S: 00 00 04 00
T: 00 00 08 00
U: 00 00 10 00
V: 00 00 20 00
W: 00 00 40 00
X: 00 00 80 00
Y: 00 00 00 01
Z: 00 00 00 02
Where (for eg) you want to hide Drives {C,E,J,O,R,U,Y,Z} you would give 'NoDrives' the value 14 42 12 03
Where C+E = 14, J+O = 42, R+U=12 and Y+Z = 03
Please NOTE: The Numbers are to be added in HEXadecimal ie: ABCD = 0F, not 15 All Drives Visible is 00 00 00 00 All Drives Hidden is FF FF FF 03

You can prevent Network Neighborhood from displaying computers in your
local workgroup or domain with a simple Registry change (as always, be
careful when editing the Registry--we can't guarantee the results).
You can still access these computers; they just don't show up in the
Network Neighborhood listing. To make this change, use the NT Registry
Editor to modify the following key:


For the value NoWorkgroupContents, set the value to 1. Save your
changes and restart your system.

~Hope it helps

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Here is a program with Unbelievable options, one of them is to hide any drive on your computer.
PC Security
the link is :
good luck
E1uSiV3Author Commented:
This was exacly what i was looking for as i can import reg strings using batch files and you inclueded some good liks too :) thx for all yr help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.