Hiding Drives in Windows 7

This simple registry hack allows you to hide drives from appearing in the Windows Explorer shell. Users will not be able to select or see the drive in the applications’ open and save dialogs, My Computer and Windows Explorer but it remains visible from other shells such as, the command prompt. Therefore, applications can still access the hidden drive, even though it is invisible to end users! A hidden drive may be useful when backing files to a network or local drive and you would like to restrict that drive just for backup purposes. The risk of filling up that drive with unrelated data is limited by making it invisible to users including you, while it remains available to the backup application. Obviously, first set the backup destination drive from the backup application and then hide the drive as explained below.

The registry hack requires a numeric value that represents the drive. Now, to find out the numeric value of the drive you need to hide, you must map the drives’ letters to a binary value and then convert that value to a decimal number. For example to hide the drive H: map the drive letters to a binary value as shown below:

Z Y X W V U T S R Q P O N M L K J I H G F E D C B A

0 0 0 0  0 0 0 0  0 0  0 0 0 0 0 0 0 0 1 0 0 0 0  0 0 0

To convert the binaryvalue 10 000 000 to decimal, open Windows 7 calculator by typing calc in the Start search text box and pressing enter. Select the programmer mode from the menu item View, and select the Bin radio button. Then enter the binary value 10 000 000 which you derived from the mapping task above and click the Dec radio button on the calculator. Take a note of the resultant decimal value which should be 128 in our example.

To start the registry editor, type regedit in the Start menu search text box and press enter.

Following the example above, in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer create the DWORD NoDrives with a value of 128. You need to log off and back on to see the change.

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer
DWORD Name: NoDrives
DWORD Value: 128 (Decimal value)

 

A word of caution – incorrectly editing the registry may severely damage your system. The above modifications are intended for Windows knowledgeable users who are familiar with the registry editor. Users are also reminded to take a backup of the registry before making any critical changes.

Share