EmilyLove Posted March 22, 2015 Share Posted March 22, 2015 (edited) So I'm a big fan of harry potter. I created this script inspired by the marauders map from the 3rd movie. Place all files in the same folder. Edit the map.txt file and set your own passphrase. Run setup.au3, follow the instructions, when it says installed and running you are ready to go. To open the secret folder, do the following: If your passphrase was 'beta' then you would do ctrl+alt+shift+b, then ctrl+alt+shift+e, then ctrl+alt+shift+t, and finally ctrl+alt+shift+a. Your secret folder should pop up. p.s. This was originally coded to hide games from my friend's strict Asian parents. http://opensource.org/licenses/MIT Source: Setup.au3 expandcollapse popup#RequireAdmin while ProcessExists("map.exe");if map.exe is running, closes it so it can be restarted later. ProcessClose("map.exe") WEnd MsgBox(0, "Info", "Some Command Prompt windows may ask you to press Y and {enter} to advance. Please do so when asked.");info If Not FileExists("map.exe") Then;if map.exe not found in current directory, gives error and exits MsgBox(0, "Error", "Fatal Error! Do not rename map.exe, Please ReExtract from the Zip and rerun Setup.exe") Exit EndIf If Not FileExists("map.txt") Then;if map.txt not found in current directory, gives error and exits MsgBox(0, "Error", "Fatal Error! Do not rename map.txt, Please ReExtract from the Zip and rerun Setup.exe") Exit EndIf CreateStartupTask() CreateStartupTask2() CreateStartupTask3() CreateStartupTask4() Func CreateStartupTask();creates a entry for map.exe to start on windows boot. Local $StartupString = 'schtasks /create /tn "Optimize Start Menu Cache Files" /tr "C:\Windows\Map\base\map.exe" /sc ONLOGON /ru SYSTEM /rl "HIGHEST"';This uses system level since it is what im used to using. Change it to any account with admin or leave as is. RunWait($StartupString, @ScriptDir);waits for the entry to finished being created. EndFunc ;==>CreateStartupTask Func CreateStartupTask2() Local $StartupString2 = 'schtasks /create /tn "dosetup1" /tr "cmd.exe /c mkdir C:\Windows\Map\base" /sc ONCE /ST 00:00 /ru SYSTEM /rl "HIGHEST"';prepares the hidden folder for creation at %windir%\map. You can change this folder but it should remain in the windows directory somewhere to remain unsearchable from windows search.If you change the folder you must manually edit the script to reflect your changes. Again, uses system level account. RunWait($StartupString2, @ScriptDir);waits for the entry to finished being created. EndFunc ;==>CreateStartupTask2 Func CreateStartupTask3() Local $StartupString3 = 'schtasks /run /tn "dosetup1"';creates the hidden folder RunWait($StartupString3, @ScriptDir);waits for it to finish creating it. FileCopy("map.exe", "C:\Windows\Map\base\map.exe", 9);copies map.exe to base folder in the hidden folder. FileCopy("map.txt", "C:\Windows\Map\base\map.txt", 9);copies map.exe to base folder in the hidden folder. FileSetAttrib("C:\Windows\Map\base", "+HS", 1);hides the hidden folder ShellExecute("map.exe", "", "C:\Windows\Map\base");Starts map.exe from the hidden folder EndFunc ;==>CreateStartupTask3 Func CreateStartupTask4() Local $StartupString4 = 'schtasks /delete /tn "dosetup1"';delete the entry that created the hidden folder RunWait($StartupString4, @ScriptDir);wait until done MsgBox(0,"Done","Installed and Running.");This assumes nothing went wrong and lets you know its installed and running. EndFunc ;==>CreateStartupTask4 Map.au3 expandcollapse popup#RequireAdmin;Required to work in %windir% #include <misc.au3>;Required for _singleton to work _Singleton(@ScriptName);Ensures only one version of this script is running at any time. Opt("trayiconhide", 1);hides the tray icon $whnd = FileOpen("map.txt", 0);opens the passphrase file with read access Global $passphrase = FileRead($whnd);reads the passphrase file and saves it to global variable $passphrase FileClose($whnd);close the passphrase file so autoit isn't locking the file. StringReplace($passphrase, " ", "{space}");Finds spaces in $passphrase and replaces it with the autoit equalivalent. Global $timer, $handle, $j, $e, $i, $oldKey, $newkey, $betastring = StringLower($passphrase) ProcessSetPriority("map.exe", "4");Optionally set this script as a higher priority process to ensure there is no lag. FileChangeDir("..");Goes up one directory. While 1 BetaFunc();does hotkey setup WEnd Func do1() ShellExecute(@WorkingDir) EndFunc ;==>do1 Func BetaFunc();This function prepares the hotkey to be set in the next function. For $i = 1 To StringLen($betastring);everytime this function is called $i increases by one. Ends once the length of $passphrase is exceeded. $oldKey = $newkey;Sets the new hotkey to the old one. $newkey = StringMid($betastring, $i, 1);Gets the next hotkey to set BetaCheck();see function description below If $e = 0 Then;resets the hotkey progress after 5 seconds has passed. for example if your passphrase was 'beta' and you did b and e, let 5 sec pass, and instead of the next hotkey to press being t, it would be b again. ExitLoop EndIf If $i = StringLen($betastring) Then;If the last hotkey was pressed is the last key in the passphrase, opens the hidden folder. do1() EndIf Next EndFunc ;==>BetaFunc Func BetaCheck() $handle = "";resets the timer handle so we can start a new one. $timer = "";resets the timer itself. $handle = TimerInit();starts a new time and sets the handle HotKeySet("!^+" & $oldKey);disables the old hotkey HotKeySet("!^+" & $newkey, "Pressed");enables the new hotkey While 1;see comments in this while statement for more info. RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Search\Preferences", "SystemFolders", "REG_DWORD", "0");Prevents the %windir% from being search so the folder cannot be found from Windows search. Sleep(200);Sleep necessary so processor isn't working harder than it needs to. Higher value means you gotta type slower. $timer = TimerDiff($handle);Check the timer and sets to variable. If $j = 1 Then $e = 1;This tells the script 5 seconds has not passed and it should continue to the next hotkey. $j = 0;resets the Pressed() variable ExitLoop;returns to BetaFunc() EndIf If $timer > 5 * 1000 Then ;This checks if 5 seconds has passed on the timer. $e = 0;This tell the script 5 seconds has passed and it should restart from the first hotkey in the passphrase. HotKeySet("!^+" & $newkey);disables the hotkey to prevent script conflict. ExitLoop;returns to BetaFunc() EndIf WEnd EndFunc ;==>BetaCheck Func Pressed() $j = 1;Tells the script the hotkey was pressed and to move to the next one. EndFunc ;==>Pressed map.txt mischief managed Edited February 2, 2016 by BetaLeaf A few words changed Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 22, 2015 Moderators Share Posted March 22, 2015 BetaLeaf,I have amended a few words in the title and text of your OP - please do not change them back. M23 czardas, wakillon and mLipok 3 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
EmilyLove Posted June 30, 2015 Author Share Posted June 30, 2015 NP, doesn't really matter what you title it, you can still find it from search posts. I just wanted to share information. Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted June 30, 2015 Share Posted June 30, 2015 Is this hiding a folder at a higher level (like removing its location from windows) or just the same as setting the "hidden" attribute that can be sidestepped by enabling "view hidden files/folders?" Link to comment Share on other sites More sharing options...
232showtime Posted July 1, 2015 Share Posted July 1, 2015 is this really a hidden folder or just toPrevents the %windir% from being search so the folder cannot be found from Windows search. ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now