Hiding a hard drive or partition in Windows can be an effective way of preventing access to the drive's contents. The method is not foolproof though, and users with enough time on their hand will eventually find a way to access the contents of the drive, for instance by booting from a Live CD. Still, it works pretty well to hide it from inexperienced users.
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.
Better options exist in the form of disk encryption, check out our Securing Your PC With True Crypt guide for a walkthrough.
There are several options in Windows to hide a disk in the operating system. Lets start:
Hide A Hard Drive or Partition: Command Prompt
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 enter 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.
Hide A Hard Drive or Partition: Windows Registry
The second method of hiding drives in Windows is by manipulating the Windows Registry. Open the Windows Registry with Windows-R, regedit and enter.
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:
- 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
- ALL: 67108863
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.
Hide A Hard Drive or Partition: Group Policy
The Group Policy is not available in all editions of the Windows operating system. To find out if it is try to launch it. This is done 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 for instance.
Navigate to the following template in the Local Group Policy Editor:
User Configuration > Administrative Templates > Windows Component > Windows Explorer
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.
Software to hide drives in Windows
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.