Thursday, February 19, 2015

How to Create a Password Protected Folder without any Extra Software



For example I have a important data in a folder in C drive which I want to lock it.

Open a notepad and paste the below given script in it.
_____________________________________________________________________
cls
@ECHO OFF
title Folder Private
if EXIST "HTG Locker" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the folder(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 secure "HTG Locker"
attrib +h +s "HTG Locker"
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== iforgot@8 goto FAIL
attrib -h -s "HTG Locker"
ren "HTG Locker" secure
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md secure
echo secure created successfully
goto End
:End
________________________________________________________
3) Then save notepad file as .bat file For example: private.bat in C drive and close it.

4)  Now run your batch file by double clicking on it–the first time you run it, it will create a folder called Secure. This is where you can store all your secret things. When you have finished adding all your stuff to the Secure folder, run locker.bat again.

5) This time you will be asked if you sure that you want to lock the folder, press the “Y” key and hit enter to lock your folder.

6) You will see that your Secure folder quickly disappears.

7). If you run the batch file again, you will prompted for a password.

8) If you enter the same password as you set in the script the Secure folder will reappear if you enter the incorrect password the script will just Terminate.

If You Forget Your Password

Seems like once a week somebody writes in asking how to figure out the password they set. And the answer is really simple: Right-click on the locker.bat file and choose Edit.

Then you can see the password you set in the file.

How to Hide and Lock Hard Disk Drives in "My Computer"

1.      Click on the "Start" button. Go to "Run", type "gpedit.msc" and press enter.
Ad

2.      Wait for the "Group Policy" window to appear. Click on the "+" button beside User Configuration then click on the "+" button beside "Administrative Templates". Then click the "+" button beside "Windows Components" and then click "Windows Explorer".


3.      Search for "Hide these specified drives in My Computer" in the options that appear in the right column of the window. Double click it, enable it and choose the drive(s) you want to hide.

  
4.      Search for "Prevent access to drives from My Computer". Double click it and repeat the previous step if you want to stop accessing any drive by "command" (e.g, by typing "C:" in the address bar or "Run").


5.      Close the group policy window and restart the computer to changes to take effect.

6.      Only the first hard disk drives can be locked here.


TIPS

·         If you don't want to hide the hard disk drive, but only want to stop accessing them; then use the "Prevent access to drives from My Computer" option.

·         You can change any one of the options from "Hide these specified drives in My Computer" or "Prevent access to drives from My Computer". Just choose the option best matching your needs.

·         If you only want to hide the hard disk drives from "My Computer" and still want to access them via "Windows Explorer"; use the "Hide these specific drives in My Computer" option.