Sign in to follow this  
Followers 0
zachzhuff

Folder Hider With Password

3 posts in this topic

I cant post in the exapmle scripts section it says Im not allowed to so Im posting this here could a mod plz move it to Exapmle Scripts

Simple Version:

This program hides the enculded folder on the T Drive the loc must be T:/Math. The default passes are Lock: lock11 and Unlock: unlock11 You can download the easy version at freewebs.com/pr0xy55/aa.aa its aa.aa because my schools block .exe's so rename it when you download it

Advance Version:

I made this because I wanted to hide programs like Firefox on my schools shared drive. I know there are alot of other ways to do this seemed to work the best because it doesnt need programs installed on the computer or on ur drive and I switch computers alot so I cant install some folder hider on each computer becuase it would take to long. The admins I think search for exes and check them out when it finds them. They dont do anything if they see FireFox installed but they delete it. The reason I use FireFox is becuase it gets by one of there blocks which is the better one so you can get to most sites with FireFox. This program uses 2 ways of hiding the folder

1. Renames the folder Math to Math.{21EC2020-3AEA-1069-A2DD-08002B30309D} which will make it look like the control panel button u can try this by makeing a .bat file like this:

move "Math" "Math.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

Then switch that around to fix it

2. Changes the file attrubets of the file to System, Read Only and Hidin

The program uses passwords incase the admins try running it which probly wouldnt matter anyways because the way the program is but I just wanted to learn how to use .ini files and try to learn other stuff with it

The default passwords are Lock Pass: lock11 Unlock Pass: unlock11

If you mess somthing up and cant find ur folder run this .bat

move "Math.{21EC2020-3AEA-1069-A2DD-08002B30309D}" "Math"

move "ERROR" "Math"

attrib -RASH T:/Math /S /D

It saves the password in a huge .txt file that has tons of fake line. Thats what I did to encrypt it. It needs to be the one attached cause it checks 2 other keys to make sure someone doesnt delete teh .txt and have the program add it and then theyll see where the password is.

For this to work the .txt has to be in the "Math" folder and the Math folder must be on a T Drive so the loc is T:\Math

Heres code:

; Hide Folder
#include <GUIConstants.au3>

$Input1 = 0
$Input2 = 0
$Input3 = 0
$Input4 = 0
$Input5 = 0
$lockpass = Random ( 100000000, 999999999 )
$inifile = "error.error.error"
$okexit = 0
$nullvar = 0

; First Check
$inifilelock = FileExists ( "T:\Math.{21EC2020-3AEA-1069-A2DD-08002B30309D}\Vocab13.txt" )
$inifileunlock = FileExists ( "T:\Math\Vocab13.txt" )
Select
    Case $inifilelock = 1
        $inifile = "T:\Math.{21EC2020-3AEA-1069-A2DD-08002B30309D}\Vocab13.txt"
    Case $inifileunlock = 1
        $inifile = "T:\Math\Vocab13.txt"
    Case Else
        $okexit = MsgBox ( 0, "Error", "File 1 missing" )
        Exit 0
EndSelect
$inifilelock2 = IniRead ( $inifile, "717640.101910417", "357038.467019632", $lockpass )
If $inifilelock2 = "746164.895379353" Then
    $nullvar = 0
    Else
        $okexit = MsgBox ( 0, "Error", "File 2 missing" )
        Exit 0
EndIf

$lock = IniRead ( $inifile, "3779100318355734", "2128060844889226", $lockpass )
$unlock = IniRead ( $inifile, "5197810365530348", "1776860615536133", $lockpass )

Func IniCheck()
$inifilelock = FileExists ( "T:\Math.{21EC2020-3AEA-1069-A2DD-08002B30309D}\Vocab13.txt" )
$inifileunlock = FileExists ( "T:\Math\Vocab13.txt" )
Select
    Case $inifilelock = 1
        $inifile = "T:\Math.{21EC2020-3AEA-1069-A2DD-08002B30309D}\Vocab13.txt"
    Case $inifileunlock = 1
        $inifile = "T:\Math\Vocab13.txt"
    Case Else
        $okexit = MsgBox ( 0, "Error", "File 1 missing" )
        Exit 0
EndSelect
$inifilelock2 = IniRead ( $inifile, "717640.101910417", "357038.467019632", $lockpass )
If $inifilelock2 = "746164.895379353" Then
    $nullvar = 0
    Else
        $okexit = MsgBox ( 0, "Error", "File 2 missing" )
        Exit 0
EndIf
EndFunc

; Section, Key
; "3779100318355734", "2128060844889226",
; "5197810365530348", "1776860615536133"

Opt ( "GUICoordMode",2 )
GUICreate ( "Math", 105, 80 )
$Input1 = GUICtrlCreateInput ( "", 5, 5, 100 ) ; 3
$Button1 = GUICtrlCreateButton ( "Enter Password", -98, 25, 95 )
$Button2 = GUICtrlCreateButton ( "Change Password", -95, 0, 95 )
GUISetState ()

While 1
    $GUI = GUIGetMsg()
    Select
        Case $GUI = $GUI_EVENT_CLOSE
            Exit 0
        Case $GUI = $Button1
   Call ( "PasswordA" )
  Case $GUI = $Button2
   Call ( "SetPass" )
    EndSelect
Wend

Func PasswordA()
Call ( "IniCheck" )
 $lock = IniRead ( $inifile, "3779100318355734", "2128060844889226", $lockpass )
 $unlock = IniRead ( $inifile, "5197810365530348", "1776860615536133", $lockpass )
 $Password = GUICtrlRead ( 3 )
 Select
Case $Password = $lock
 Call ( "DirLock" )
 Exit 0
Case $Password = $unlock
 Call ( "DirUnlock" )
 Exit 0
 Case $Password = "reset4321"
 IniWrite ( $inifile, "3779100318355734", "2128060844889226", "lock11" )
 IniWrite ( $inifile, "5197810365530348", "1776860615536133", "unlock11" )
 MsgBox ( 0, "Password", "Passwords reset to Lock: lock11 Unlock: unlock11" )
Case Else
 Call ( "ExitPass" )
 EndSelect
EndFunc

Func SetPass()
Call ( "IniCheck" )
 GUICreate ( "Change Pass", 221, 118 )
 ; Old Unlock Pass
 GUICtrlCreateLabel ( "Old Unlock Password:", 5, 5, 115 )
 $Input2 = GUICtrlCreateInput ( "", 0, -23, 100 ) ; 4103
 ; New Unlock Pass
 GUICtrlCreateLabel ( "New Unlock Password:", -215, 5, 115 )
 $Input3 = GUICtrlCreateInput ( "", 0, -23, 100 ) ; 4105
 ; Old Lock Pass
 GUICtrlCreateLabel ( "Old Lock Password:", -215, 5, 115 )
 $Input4 = GUICtrlCreateInput ( "", 0, -23, 100 ) ; 4107
 ; New Lock Pass
 GUICtrlCreateLabel ( "New Lock Password:", -215, 5, 115 )
 $Input5 = GUICtrlCreateInput ( "", 0, -23, 100 ) ; 4109
 ; Set Pass
 $Button3 = GUICtrlCreateButton ( "Set Password", -150, 2, 95 )
 GUISetState ()
 ; Pass
 While 2
    $GUI2 = GUIGetMsg()
    Select
        Case $GUI2 = $GUI_EVENT_CLOSE
            Exit 0
        Case $GUI2 = $Button3
   Call ( "CheckPass" )
    EndSelect
 Wend
EndFunc

Func CheckPass()
Call ( "IniCheck" )
 $Pass1o = GUICtrlRead ( 4103 )
 $Pass2o = GUICtrlRead ( 4107 )
 $unlock = IniRead ( $inifile, "3779100318355734", "2128060844889226", $lockpass )
 $lock = IniRead ( $inifile, "5197810365530348", "1776860615536133", $lockpass )
 If $Pass1o = $lock Then
 If $Pass2o = $unlock Then
  Call ( "ChangePass" )
 Else
  MsgBox ( 0, "Error", "One of the old passwords are wrong" )
 EndIf
 Else
  MsgBox ( 0, "Error", "One of the old passwords are wrong" )
 EndIf
EndFunc

Func ChangePass()
Call ( "IniCheck" )
 $Pass1n = GUICtrlRead ( 4105 )
 $Pass2n = GUICtrlRead ( 4109 )
 IniWrite ( $inifile, "3779100318355734", "2128060844889226", $Pass2n )
 IniWrite ( $inifile, "5197810365530348", "1776860615536133", $Pass1n )
 $lock = IniRead ( $inifile, "3779100318355734", "2128060844889226", $lockpass )
 $unlock = IniRead ( $inifile, "5197810365530348", "1776860615536133", $lockpass )
 $ShowPass1 = "Passwords changed to Lock Password: "
 $ShowPass2 = " Unlock Password: "
 MsgBox ( 0, "Password", $ShowPass1&$lock&$ShowPass2&$unlock )
EndFunc

Func DirLock()
Call ( "IniCheck" )
 ProcessClose ( "ie.exe" )
 ProcessClose ( "ff.exe" )
 ProcessClose ( "firefox.exe" )
 ProcessClose ( "internet.exe" )
 ProcessClose ( "ie.exe" )
 DirMove ( "T:\Math.{21EC2020-3AEA-1069-A2DD-08002B30309D}", "T:\ERROR", 1 )
 DirMove ( "T:\Math", "T:\Math.{21EC2020-3AEA-1069-A2DD-08002B30309D}", 1 )
 FileSetAttrib ( "T:\Math.{21EC2020-3AEA-1069-A2DD-08002B30309D}", "+RASH" )
EndFunc

Func DirUnlock()
Call ( "IniCheck" )
 DirMove ( "T:\Math", "T:\ERROR", 1 )
 DirMove ( "T:\Math.{21EC2020-3AEA-1069-A2DD-08002B30309D}", "T:\Math", 1 )
 FileSetAttrib ( "T:\Math", "-RASH" )
EndFunc

Func ExitPass()
 MsgBox ( 0, "Password", "Wrong Password" )
 Exit 0
EndFunc

Share this post


Link to post
Share on other sites



Can the folder be a network folder for example: JIMS-NOTEBOOKSharedDocsbackup

Thanks for any help...

Share this post


Link to post
Share on other sites

Considering that this topic is 4 years old, the OP hasn't been here in over 2 years, I don't think you'll get much of a response.

Here's a thought though, try it and see for yourself if it works for that situation, rather than asking a pointless question.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0