Thursday, 26 May 2011

Lock The Folder (By makin it a recycle bin)

Suppose you have to lock the folder Rajwin which has the
path e:\Rajwin. Open notepad and type


ren Rajwin Rajwin.{645FF040-5081-101B-9F08-00AA002F954E}
Now save it as lock.bat

Remember if you have saved this batch file in same drive
in which folder Rajwin has placed, then above method is
right but if you save the file in any other drive or in
desktop then you have to specify the path. Let us
suppose if you have your Rajwin folder in e: but you
save the file in desktop or in any other drive then
you have to type as


ren e:\Rajwin Rajwin.{645FF040-5081-101B-9F08-00AA002F954E}

Now open this batch file ur folder will change to
Recycle Bin with the name Rajwin, so no one can access
it. Whenever someone would try to access this folder,
recycle bin will get opened.

Actually {645FF040-5081-101B-9F08-00AA002F954E}

 is the registry value for Recycle bin. This batch file will
rename the Rajwin folder with ren command to Recycle Bin.
In the similar way you can change it to control panel
by replacing

{645FF040-5081-101B-9F08-00AA002F954E}
with
{21EC2020-3AEA-1069-A2DD-08002B30309D}

Now for unlocking this folder create one more batch file
with same method and type

ren Rajwin.{645FF040-5081-101B-9F08-00AA002F954E}

 Rajwin

and save it as unlock.bat

Recycle Bin will change back to original folder.
However it's just a two line method but for learning
purpose, you must have the knowledge how it works.

0 comments:

Post a comment