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.

If you enjoyed this post, subscribe for updates (it's free)

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.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.