Hide and lock any drive(s) using regedit

Status
Not open for further replies.

anilmail17

Journeyman
You can hide any of drive(s) by just adding two keys in windows registry

goto start>run

Type regedit and press enter. This will bring you to the registry editor.To hide any drive you have to follow these 2 steps

STEP1: Hidding Drive
goto HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer now create a new DWORD value NoDrives and set its value as

2^(Alpha Number of Drive Letter-1)
where Alpha number are simple counting of alphabets from A to Z as 1 - 26

for example: to hide C drive
Alpha number of C is 3 so 2^(3-1) = 4 (decimal value)

If you want to hide more than one drive than calculate the value of each drive as explained and then set sum of those numbers as value

Step2: Prevent Access to the drive
Now as we have make our drive invisbble but it is still accesible so to lock the drive we will create another DWORD value at

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
create a new DWORD value NoViewOnDrive and set its value same as you have calculated for hidding the drive(s)

Now your drive is locked. If you want to unlock and unhidden the drive then just delete these two keys and your drive is again accessible. You can also create two .reg files one for hidding and locking and another one for unlocking and unhidding
 

Ramakrishnan

The Researcher
I request all the registry gurus to include the "reg' files" so that the uninitiated will not mess up their registry while doing something. Moreover mistakes are less likely to happen
 
OP
anilmail17

anilmail17

Journeyman
we all learn from mistake. Iif something goes wrong by a registry learner then its good, he will learn from that and i cannot create a .reg file for this tutorial because value of DWORD used is diffrent for each drive
__________
Yaa Kiran_tech_mania u r right. I forgot to add the line of Caution and a line of advice
Caution: Playing with registry always is dangerous.
Advice: always backup your registry
 
Last edited:
OP
anilmail17

anilmail17

Journeyman
To hide more than one drive find the number for both drive separately and then and them in decimal, use the result value and set them as value for NoDriveOnView and NoDrives
 
Status
Not open for further replies.
Top Bottom