Lock your Drive(s) with REGISTRY and Visual Basic 6.0


Registry is one of the important thing in PC.
Any one can change anything from it....But be careful at the time of changing....It may cause damages due to incorrect registry values and other things.
Here I'm showing how to LOCK a specific drive using REGISTRY and VISUAL BASIC.
steps--------

You need a form - form1
A command Button - cmdbut1

and some ideas--------

copy and paste the code and enjoy.....

'----------------------------------------------COPY START HERE----------------------------------------------
Private Sub cmdbut1_Click()
dim a
on error resume next
a=shell("REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoViewOnDrive /t REG_DWORD /d 4 \F")
End Sub
'----------------------------------------------COPY END HERE------------------------------------------------

But friends I'm showing to lock only C Drive....If you need to lock other drives just follow the codes.
Just interchange with the above "4".

Drive=Code
A=1
B=2
C=4
D=8
E=16
F=32
G=64
H=128

......and so on.

Enjoy and protect your privacy.....Good bye.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options