How To Lock Any Folder In Windows (With Description)?

Hi everyone! In this post, I will show you with detail about locking any folder in Windows. Before continue, check out my other post on locking folder using cmd from here.
Suppose you want to lock the folder "hack" which has the path "e:\hack".
  • Open notepad.
  • Type ren e:\ hack hack.{645FF040-5081-101B-9F08-00AA002F954E} 
  • Save it as lock.bat
  • Now open batch file.
  • Your folder will change to Recycle Bin with the name hack, so no one can access it now.
  • 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 hack folder to Recycle Bin (using ren command). Similarly, you can change it to control panel by replacing {645FF040-5081-101B-9F08-00AA002F954E} with {21EC2020-3AEA-1069-A2DD-08002B30309D}.
  • For unlocking the folder, create one more batch file with same way and type ren hack.{645FF040-5081-101B-9F08-00AA002F954E} hack in it.
  • Save it as unlock.bat 
  • Recycle Bin will change back to original folder.
Note: However it's just a two line method but for learning purpose, you must have the knowledge about how it works.

Sharing is Caring

Related Posts

Next Post »

Thank you for your comment.