ZANZA
Joined: 10 Aug 2009 Posts: 12
|
Posted: Mon Aug 10, 2009 7:37 am Post subject: Hide Folder With Password Protection |
|
|
Hey guys this app hides and password protects folder at "C:\lol" for this app to work you must have a folder called lol at the above location. hope you like it as its my first so yeah tell me what you thinks of it
| Code: |
;A message box
MsgBox, Please save your data and close all windows. Remove all external devices!
;Reading reg for hiddenfiles enabled or not
RegRead, OutputVar3, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL, CheckedValue
;reading output
s4 = %OutputVar3%
; 1 = hidden files enabled. 0 = hidden files disabled
if(s4 == 1)
{
;because hidden files are enabled, we're changing them to be disabled
RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL, CheckedValue, 0
MsgBox Registry is changed to 0.
;you have to restart your computer for this setting to be changed
run shutdown -s -t 60 -c "YOU HAVE TOO SHUTDOWN YOUR COMPUTER FOR THIS TO TAKE AFFECT!"
}
else
{
;file called lol to be locked
IfExist, C:\lol
{
InputBox, UserInput1, password, Enter Password, Please Enter Your PasswordPassword.,
if ErrorLevel
{
MsgBox, 4,, Are you sure you wan to exit?
IfMsgBox Yes
ExitApp
}
else
;users first password
MsgBox, You entered "%UserInput1%"
;writing first password to reg
RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, Software\Password, Password1, %UserInput1%
;confirmation of password
InputBox, UserInput2, Password, Confirm Password, Please Confirm Your Password,
if ErrorLevel
MsgBox, 4,, Are you sure you wan to exit?
IfMsgBox Yes
ExitApp
else
;confirmed password
MsgBox, Your Confirmed Password is "%UserInput2%"
;writing second password for conformation
RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, Software\Password, Password2, %UserInput2%
;declaring variables
s1 = %UserInput1%
s2 = %UserInput2%
;if passwords match...
if ( s1 == s2)
{
MsgBox Passwords Match!!!
;asking user to lock the file
MsgBox, 4,, Would you like to lock the folder
IfMsgBox Yes
{
;changing the attributes of "lol" to system and hidden
FileSetAttrib +S+H, C:\lol
;renaming "lol" to control panel (if you don't change the attributes and you rename "lol" to "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" and you double click on CP you will enter CP its a good place to hide things)
FileMoveDir, C:\lol, Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}
MsgBox Folder Successfully Locked!
}
else
MsgBox You did not lock the folder.
ExitApp
}
Else
MsgBox Passwords do not match!!
}
Else
{
;unlocking the folder
InputBox, UserInput, password, Enter Unlock Password, Please Enter the Unlock Password.,
;reading the password when you locked the folder
RegRead, OutputVar2, HKEY_LOCAL_MACHINE, SOFTWARE\Password, Password2
;declaring the variables
s1 = %UserInput%
s2 = %OutputVar2%
;if passwords match...
if (s1 == s2)
{
;changing CP's attributes to not hidden, not system
FileSetAttrib -H-S, Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}
;renaming CP to lol
FileMoveDir, Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}, C:\lol
MsgBox Folder Unlocked Successfully at the location of C:\lol!
;this is because you might want to see other hidden folders
MsgBox, 4,, Would you like to change the registry?
IfMsgBox Yes
{
;changing the registry back to 1
RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL, CheckedValue, 1
MsgBox Registry is changed to 1.
ExitApp
}
Else
MsgBox Registry not changed
}
Else
MsgBox Passwords Do Not Match
}
}
|
_________________ Beta. Software undergoes beta testing shortly before it's released. Beta is Latin for "still doesn't work."
The programmer's national anthem is 'AAAAAAAARRRRGHHHHH!!'. |
|