Friday, January 21, 2011

Registry Trick: Hide and lock any drive(s) using regedit

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 invissible 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

5 comments:

Unknown said...

thanks man that really helped..
but whats the process of hiding two or three drives at a time..

Vinit said...

for hiding more than 1 drive you can also use gdedit.msc

Anonymous said...

If u wanna hide more than 1 drive suppose a & c,then we know value of c=4 & d=8. so, addition the values of a & c=(4+8)=12. put this in "NoDrives" as a decimal value.then u see ur c & d drives both are hide.

Unknown said...

Sorry the previous comments have some fault. If u wanna hide more than 1 drive suppose C & D,then we know value of C=4 & D=8. so, addition the values of C & D=(4+8)=12. put this in "NoDrives" as a decimal value.then u see ur C & D drives both are hide.

franklinj said...

I have tried to lock my drive and I was pretty successful using the method, as the hard drive had only one partition so a Restoration Process for Windows Operating System was the only option and there was no way to retrieve the data.