Lock Folder without any software: Directory lock using CLSID

Folder locker:

The batch file is used to execute bunch of code at a one time. When the code given bellow gets executed, it creates the folder as the name Locker.

Now put the important content inside the Locker directory. Then once again execute the same batch file and it will asks you to whether you want to lock the directory. Now press ‘y’ and hit enter and then the folder Locker will disappears.

Now if you want to make the folder visible again then re-run the same batch file. Now this point of time it will asks you to enter password to unlock the directory.
you have to enter the password as ‘important’, since it is already mentioned by in the program.

When the password is matched, the folder becomes visible and you can have access to the folder.

So, what happens is that, the folder ‘Locker’ is set with the system and hidden attribute and it becomes invisible, when the batch file gets executed again, it will asks for password, which is already set by you in the code as ‘important’, when it matches, then the folder becomes visible and can be accessed.

Code to lock the folder.

@echo off
title Folder Locker
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure you want to Lock(Y/N)
set/p “cho=>”
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p “pass=>”
admin
if NOT %pass%== important goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End

Alternate smartest way — Using CLSID (Lock Folder Without any software)

On the above method one problem is that anyone can open the .bat file in notepad and see your password.So, one alternate way is that instead of locking the folder with password just rename it with CLSID (windows class Identifier)

By renaming the folder with class-identifier on command prompt you will get the specific windows identified icon instead of the folder you gave and if anybody click on that icon then he/she will be redirected to the specific (my-computer / control-panel or any) identified location.

https://www.youtube.com/watch?v=tyK2iNEg1gE

To lock or rename folder with clsid just follow the Video steps. Hope you enjoyed. Feels free to ask or comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *