The MOIs Factory
Hello World!
Now we are going to share new Tricks, Tips and everything related to computer on our youtube channel and on our new facebook page. Please do Subscribe our youtube channel and Like out facebook page to get every single video direct to your computer/mobile.
Stay Connected To Get More!

Please Subscribe our new youtube channel The MOIs Factory - Youtube and Like our new facebook page The MOIs Factory - Facebook To get more about computer.

Password Protected Folder


Password protected folder using VBScript



Now I am going to show you How to open your Folder by Entering a Password. That means you can protect your data in particular folder. Whenever you want to open this Folder then you have to Enter your password because I will use “Attrib” command of DOS for hide Folder and then I will Open it by password. So here is VB Script code to Open that Folder by password. Let’s Start.

Step 1 : Open your notepad [Start >> Run >> Type “notepad“ >> Press Enter]

Step 2 : Copy The Following Code in notepad and save it as “Locker.vbs”


'errorcode401.blogspot.in
'========================
Sub Run(ByVal sFile)
Dim shel
Set shell = CreateObject("WScript.Shell")
shell.Run Chr(34) & sFile & Chr(34), 1, false
Set shell = Nothing
End Sub
Dim storedPassword
storedPassword ="errorcode401"
password = InputBox("Please enter password to unlock 'My Locker'.","Locker by Errorcode401")
if password = storedPassword Then
Run "D:\My Locker"
Else
WScript.Echo "Opppsss, wrong Password!"
End if
'======================== 


Step 3 : Now Create One Folder in “D” Drive name with “My Locker”

Step 4 : Now Open your Command Prompt and type the following command one by one.
                                                             
              Cd /d D:
              Attrib +s +h “My Locker”

              Then Close it.




>> That’s it…!!!

Now You Folder "My Locker" is Hidden when you want to open that folder you have to double click on “Locker.vbs” and then you have to provide password to open it.

[Attrib Command is just use to Set the Attribute of File/Folder, Here we are just setting attribute as system and Hidden Folder, So it is possible to anyone can unhide your folder who knows "Attrib" Command]

Change your Password :

Default Passwprd is “errorcode401”. To change it Right Click on Locker.vbs then Click on EDIT then Find for “errocode401” and Replace it with your password.



[Note : This is not good Locker as your need because you can easily see your password by opening it in notepad]