Home | SkillForge Blog | Hide Drives in Windows Explorer via Registry Setting

Hide Drives in Windows Explorer via Registry Setting

Free Tutorials

With so many hardware devices (like printers, external hard drive enclosures, and home network devices) equipped with USB ports, it’s likely that you’ve collected an array of advertised drives in Windows Explorer that are not actually accessible unless something is connected to them.  Perhaps you have setup a mirrored drive for backup purposes that you want to be “out of sight; out of mind”.

HideDrives 1

Hiding these devices is quite simple… provided you can do a bit of counting in binary.

In order to hide a specific drive (or drives), follow the steps below:

1. Click on your START button

2. In the Search box, type in “REGEDIT” (no quotation marks)

3. Launch the Registry Editor.  (note: if you are running an older operating system, like Windows XP or earlier, you may need to select RUN before typing in “REGEDIT“)

HideDrives 2

4. Navigate to the following location:

HKEY_CURRENT_USER Software Microsoft Windows CurrentVersion Policies Explorer

5. If by some unfortunate quirk of fate you are missing the Explorer key (folder), right-click on the POLICIES key and create a NEW KEY named Explorer

6. The value we are looking for is called NoDrives and is more than likely absent from your Explorer key.

HideDrives 3

7. To create the NoDrives value, right-click in an empty space of the window and select NEW and then select DWORD (32-bit) VALUE

HideDrives4

8. Name this new value NoDrives

9. The value you will enter is a 32bit number.  To determine the number for the needed drives, assign a binary value to each letter of the alphabet starting with A=1 (full list of assignments follows)

A 1
B 2
C 4
D 8
E 16
F 32
G 64
H 128
I 256
J 512
K 1024
L 2048
M 4096
N 8192
O 16384
P 32768
Q 65536
R 131072
S 262144
T 524288
U 1048576
V 2097152
W 4194304
X 8388608
Y 16777216
Z 33554432

10. Add up all of the numbers corresponding to the drive letters you wish to hide.  In this example, the drives to be hidden are “P”, “X”, and “Z”

P 32768
X 8388608
Z 33554432

The sum of those digits is 41975808.  This will be the number you enter in the NoDrives value.  Make sure you have the base set to DECIMAL and not HEXADECIMAL.  The Hex equivalent to our number would be 2808000 in case you’re curious.

HideDrives5

To “see” these hidden drives, you must either log out and log back in, reboot your computer, or simply stop and restart the Explorer service.

HideDrives6

If you wish to make these drives visable, set the decimal value of the NoDrives Registry value to zero (0) and restart Explorer by one of the above mentioned methods.

NOTE 1:

All of these drives are full accessible if you call them explicitly through a script or even in the Windows Explorer  location bar.

HideDrives7

NOTE 2:

If you plan on hiding and unhiding drives frequently, you can automate the entire process by creating a batch file linked to a launch icon on your Desktop.  The batch file would look similar to the following:

=============================

@echo off

regedit /s d:ResetDrivesHideDrives.reg

taskkill /f /IM explorer.exe

explorer.exe

=============================

You will need to have a support file that holds the Registry entry for the NoDrives value.  You can easily create this support file in Notepad and name if something like “HideDrives.reg” with the following code:

=============================

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer]
“NoDrives”=dword:2808000

=============================