Do you know that you can hide the disk drives in your computer? By this, you can secure your confidential data – bag all the secret files and folders into a disk drive (partition) and hide it in your Windows operating system. No one can know about the existence of that drive except you. The hidden drives can be accessed neither from the command prompt nor in the safe mode. Once you hide the disk drive, its contents are totally secured. The disk partitions can be made hidden in two methods. First one is using the command prompt and another one is applying a registry tweak. (Tip: Hide Files and Folders.)
How to Hide Partitions using Command Prompt
Hiding any disk drive through the command prompt is so easy and it works in Windows Vista, Windows 7 and Windows 8 as well.
Open the command prompt in your Windows system. (If you don’t know how to open command prompt in Windows, press the
Win key + R from the keyboard, type
regedit at the run command box and hit the enter key.
In the command prompt, type
diskpart and hit enter. This takes you into the Diskpart, a command line utility by Microsoft.
Run the following command to view the list of volumes (drives/partitions) with the corresponding volume letter.
Now choose and select the volume number which you want to hide. For instance, the volume number for
F drive is 5 (see above screenshot). Therefore, run the following command to select Volume 5.
select volume 5
You are a step away from hiding that disk drive. Run the following command.
remove letter <letter name>
<letter name> with your chosen drive letter.
Open “My Computer” and you can see that the drive has been vanished from the list. Not only the Windows explorer but also the command prompt won’t show that hidden drive. All the content and settings of the drive is safe and unaltered.
You can make the drive visible by another command in Diskpart. Here is it.
assign letter <letter name>
For instance, the command should look like this.
assign letter F
Using Batch File to Hide the Partitions
Alternatively, you can hide the hard disk drives or get back the hidden drives in your computer using batch files. Here is how to create the batch files.
Before you start writing your own batch file, you must confirm the Volume number and the Volume letter for the disk drive which you’re going to hide. So, run the list volume command in Diskpart to get the volume data. Once you grab the data, you won’t need to open command prompt anymore.
For instance, we’re going to write a batch file to hide the F drive and another to get it back.
Create a folder in any place of your hard drive. Say, the folder name is Trigger. Now, create a new text file (notepad file) named
hideScript.txt into that folder and paste the following lines in it.
select volume 5 remove letter F
Save the file . Create another text file and paste the following lines of code in it.
@echo off diskpart /s hideScript.txt
Now save the file as (
File > Save as)
hideDrive.bat at the same folder (Trigger). (Make sure to change the ‘Save as type’ to ‘All files’ when saving the text file as batch file.)
If you double-click the batch file
hideDrive.bat, it will hide the F drive within a second.
Well, we’ll now create another batch file to get back the hidden drive.
Create another text file named as
showScript.txt into the Trigger folder and paste the following lines.
select volume 5 assign letter F
Create another batch file named
showDrive.bat with the following commands.
@echo off diskpart /s showScript.txt
Double-clicking on the
showDrive.bat file will unhide the drive.
Now, place the folder in any location of your hard disk (except the drive which you want to hide).
Hiding Disk Drives using Windows Registry Editor
Another way to hide hard disk drives in Windows is applying a simple registry tweak.
Open the registry editor (press
Win + R key combination from the keyboard, type
regedit at the run command box and hit the enter key).
From the left pane, navigate to the following path.
HKEY_LOCAL_MACHINE > Software > Microsoft > Windows > CurrentVersion > Policies > Explorer
Right-click on the ‘Explorer’ key from the left side and select
New > DWORD Value.
Give the newly created value name as ‘no drive’. Now, double-click on ‘no drive’ value to modify it. You can see two fields, ‘Value data’ and ‘Base’. Set the ‘Base’ to Decimal by selecting the radio button and put the decimal value for your drive letter at the ‘Value data’ field. Here are the decimal values for drive letters.
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, Y: 16777216, Z:33554432, All: 67108863
For example, if you want to hide the F drive put 32 at the ‘Value data’ field.
If multiple disk drives are needed to be hidden, just put the sum of the corresponding decimal values of the drive letters. As for example, if you want to hide both E and F drives put 48 (16 + 32) as the value data. Though you can hide all drives by putting the value 67108863 we don’t recommend to do so. It will hide all the disk drives including the system drive which can turn into a problem. Never hide your system drive. (Also learn how to hide files behind JPEG image.)
To make the hidden drives visible, set the value data to 0 for ‘no drive’ and reboot the computer.
Hiding a hard disk drive can help you a lot to protect your confidential data. Just put your data into a drive and make it hidden. No one can know about it as there is no way to explore the hidden drive until making it visible.