Hiding a hard drive or partition in Windows can be an effective way of preventing access to a drive's content. The method is not foolproof though, and users with enough time on their hand will eventually find a way to access the content of the drive, for instance by booting from a Live CD. Still, it works pretty well to hide it from inexperienced users and to prevent accidental interaction with drives.
Why would you want to hide a drive in first place? Maybe you have private documents on it, and you do not want to risk the kids editing or deleting them, or you have some nsfw contents that you want to hide. Encrypted drives that are not mounted may have a drive letter assigned to them as well which you may not like.
Better securing options exist in the form of disk encryption, check out our Securing Your PC With True Crypt guide for a walkthrough. (Update: TrueCrypt is no more, use VeryCrypt instead, or use Bitlocker to do that).
There are several options in Windows to hide a disk in the operating system. Lets start:
This is one of the easiest options to hide drives in Windows. Open the command prompt to start the process. The easiest way is to press Windows-R, type cmd and hit enter.
Now enter diskpart into the command prompt and hit enter. This may display an User Account Control prompt, make sure to allow it by selecting Yes. Diskpart is the built-in Disk Partitioning program in Windows.
It is a good idea to display a list of all partitions on the drive. To do that type list volume in the prompt and press enter.
Locate the hard drive that you want to hide and select it in the command prompt. This can be done with the command select volume number, e.g. select volume 4 to select the fourth volume.
You can now use the command remove letter to hide the partition in the operating system. For the above example, remove letter e would remove the drive e from the operating system. The drive becomes inaccessible in Windows Explorer and other programs.
To unhide a drive use the command assign letter, in this case assign letter e. The drive becomes immediately accessible again in Windows. Note that you may need to use "select volume" first so that diskpart knows on which drive to execute the command on.
The second method of hiding drives in Windows is by manipulating the Windows Registry. Open the Windows Registry with Windows-R, regedit and enter. You may need to confirm the UAC prompt before the editor opens.
Now locate the key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer and create a new DWORD (32-bit) Value by right-clicking in the right pane.
Name the new parameter NoDrives and double-click it afterwards. Switch to decimal and enter the following values to hide the specified drive:
But what if you want to hide more than one drive letter in Windows? Simple! Just add the values of the drive letters that you want to hide. If you want to hide the drive letters A,B,D and H you would enter 139 (1+2+8+128) as the Decimal value.
It has to be noted that this will hide the drive for the current user, not all users of the operating system. The changes become visible after restarting the computer, or logging off and on again.
The Group Policy is not available in all editions of the Windows operating system. To find out if it is available, try to launch it. You launch it by pressing Windows-R, typing gpedit.msc and hitting enter.
This will only remove the disk icon, but not access to the drive. Programs can still access the drives.
Navigate to the following template in the Local Group Policy Editor:
Locate the template Hide these specified drives in My Computer. and double-click it.
Removes the icons representing selected hard drives from My Computer and Windows Explorer. Also, the drive letters representing the selected drives do not appear in the standard Open dialog box.
To use this setting, select a drive or combination of drives in the drop-down list. To display all drives, disable this setting or select the "Do not restrict drives" option in the drop-down list.
Note: This setting removes the drive icons. Users can still gain access to drive contents by using other methods, such as by typing the path to a directory on the drive in the Map Network Drive dialog box, in the Run dialog box, or in a command window.
Also, this setting does not prevent users from using programs to access these drives or their contents. And, it does not prevent users from using the Disk Management snap-in to view and change drive characteristics.
Also, see the "Prevent access to drives from My Computer" setting.
Note: It is a requirement for third-party applications with Windows 2000 or later certification to adhere to this setting.
Switch from Not Configured to Enabled and select one of the following combinations from the pull down menu that becomes active afterwards:
There is no option to hide a specific drive with a drive letter of e or up. The only option in this case is to restrict all drives.
Restart the computer, or log off and on to see the changes you have made. The modification can be reverted by disabling the setting in the Group Policy editor.
Numerous programs are available to hide drives and partitions in Windows. One of the most convenient applications is the portable software DriveMan.
Simply right-click the drive that you want to hide after starting DriveMan and select Hide Selected Drive from the context menu.Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.