Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Hiding local drives using batch files

Posted on 2003-03-22
Medium Priority
Last Modified: 2010-04-11
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
Question by:E1uSiV3
  • 2

Expert Comment

ID: 8187206
You want to hide the drives from showing up where?  

Accepted Solution

cduke250 earned 300 total points
ID: 8187478
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

Expert Comment

ID: 8188438
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

Author Comment

ID: 8234669
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

Featured Post

Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Each password manager has its own problems in dealing with certain websites and their login methods. In Part 1, I review the Top 5 Password Managers that I've found to be the best. In Part 2 we'll look at which ones co-exist together and why it'…
The article explains the process to deploy a Self-Service password reset portal I developed a few years ago. Hopefully, it will prove useful to someone.  Any comments, bug reports etc. are welcome...
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question