Pottery Posted February 3, 2010 Posted February 3, 2010 Hey, I have once again looked around the forum and can't find a solution! The file I made is loader.exe, and this is what I need help with. I want to add the .exe files that the loader starts into the loader.exe; is that possible? What I mean is, I want to have more than 1 file in the loader.exe. I want the loader.exe to have file.exe, file2.exe, and file3.exe all inside of it so that they are hidden and unaccessable without a username and password.
kaotkbliss Posted February 4, 2010 Posted February 4, 2010 here is an example of an simple installer/uninstaller that is mostly complete. Maybe you can get some usefull information from it. expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=..\..\..\..\Program Files\Terisi\Terisi.ico #AutoIt3Wrapper_outfile=Terisi Install.exe #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> TraySetIcon("Terisi.ico") Global $path Global $msg Global $button $preinstall=RegRead("HKEY_CURRENT_USER\SOFTWARE\Terisi","") $install=GUICreate("Terisi Install",400,150) GUISetIcon("Terisi.ico") $progress=GUICtrlCreateProgress ( 70, 100, 250,20) $file=GUICtrlCreateLabel("",70,70,250,20) If $preinstall<>"" Then $uninstall=GUICtrlCreateButton("Uninstall",125,30,50,40) $exit_button2=GUICtrlCreateButton("Cancel",225,30,50,40) $button=1 ElseIf $preinstall="" Then $path_input=GUICtrlCreateInput(@ProgramFilesDir&"\",50,3,250,20) $browse_button=GUICtrlCreateButton ("...",310,0) $go_button=GUICtrlCreateButton("Install",200,30,40,25) $exit_button=GUICtrlCreateButton("Cancel",150,30,40,25) $button=2 EndIf GUISetState(@SW_SHOW) If $button=1 Then While 1 $msg = GUIGetMsg($install) If $msg=$GUI_EVENT_CLOSE Then Exit(1) ElseIf $msg=$uninstall Then $path=RegRead("HKEY_CURRENT_USER\SOFTWARE\Terisi","") cancel() ElseIf $msg=$exit_button2 Then Exit(1) EndIf WEnd ElseIf $button=2 Then While 1 $msg = GUIGetMsg($install) If $msg = $go_button Then $path2=GUICtrlRead($path_input) If StringRegExp($path2, '[\\ \z]') = 1 Then GUICtrlSetData($path_input, StringRegExpReplace($path2, '([\z])', '\')) EndIf $path = GUICtrlRead($path_input) GUICtrlSetState($path_input,$GUI_DISABLE) GUICtrlSetState($go_button,$GUI_DISABLE) install() ElseIf $msg = $browse_button Then $browse = FileSelectFolder("Select","") $path_input=GUICtrlCreateInput($browse,50,3,250,20) $path = GUICtrlRead($path_input) ElseIf $msg = $exit_button Then cancel() ElseIf $msg=$GUI_EVENT_CLOSE Then cancel() EndIf WEnd EndIf Func install() While 1 ;36 steps $msg = GUIGetMsg($install) $prog=0 $steps=2.7 GUICtrlSetData($file,"Creating directories") DirCreate ( ""&$path&"\Terisi\data\Models" ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Terisi.ico") FileInstall ( "c:\Terisi\Terisi.ico",""&$path&"\Terisi\Terisi.ico",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Terisi.au3") FileInstall ( "c:\Terisi\Terisi.au3",""&$path&"\Terisi\Terisi.au3",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Terisi Install.au3") FileInstall ( "c:\Terisi\Terisi Install.au3",""&$path&"\Terisi\Terisi Install.au3",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Terisi.exe") FileInstall ( "c:\Terisi\Terisi.exe", ""&$path&"\Terisi\Terisi.exe",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"cstat.ini") FileInstall ( "c:\Terisi\cstat.ini", ""&$path&"\Terisi\data\cstat.ini",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"chairS.ini") FileInstall ( "c:\Terisi\chairS.ini", ""&$path&"\Terisi\data\chairS.ini",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"cskin.ini") FileInstall ( "c:\Terisi\cskin.ini", ""&$path&"\Terisi\data\cskin.ini",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"cdat.ini") FileInstall ( "c:\Terisi\cdat.ini", ""&$path&"\Terisi\data\cdat.ini",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Skls.ini") FileInstall ( "c:\Terisi\Skls.ini", ""&$path&"\Terisi\data\Skls.ini",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"chairC.ini") FileInstall ( "c:\Terisi\chairC.ini", ""&$path&"\Terisi\data\chairC.ini",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"cheight.ini") FileInstall ( "c:\Terisi\cheight.ini", ""&$path&"\Terisi\data\cheight.ini",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"female2.3DS") FileInstall ( "c:\Terisi\female2.3DS", ""&$path&"\Terisi\data\Models\female2.3DS",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"belt.3DS") FileInstall ( "c:\Terisi\belt.3DS", ""&$path&"\Terisi\data\Models\belt.3DS",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Jacket.3DS") FileInstall ( "c:\Terisi\Jacket.3DS", ""&$path&"\Terisi\data\Models\Jacket.3DS",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"male2.3DS") FileInstall ( "c:\Terisi\male2.3DS", ""&$path&"\Terisi\data\Models\male2.3DS",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"necklace.3DS") FileInstall ( "c:\Terisi\necklace.3DS", ""&$path&"\Terisi\data\Models\necklace.3DS",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"shoes.3DS") FileInstall ( "c:\Terisi\shoes.3DS", ""&$path&"\Terisi\data\Models\shoes.3DS",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"thong.3DS") FileInstall ( "c:\Terisi\thong.3DS", ""&$path&"\Terisi\data\Models\thong.3DS",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"hair.3DS") FileInstall ( "c:\Terisi\hair.3DS", ""&$path&"\Terisi\data\Models\hair.3DS",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"hair2.bmp") FileInstall ( "c:\Terisi\hair2.bmp", ""&$path&"\Terisi\data\Models\hair2.bmp",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"hair4.bmp") FileInstall ( "c:\Terisi\hair4.bmp", ""&$path&"\Terisi\data\Models\hair4.bmp",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"hair.bmp") FileInstall ( "c:\Terisi\hair.bmp", ""&$path&"\Terisi\data\Models\hair.bmp",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"belt2.bmp") FileInstall ( "c:\Terisi\belt2.bmp", ""&$path&"\Terisi\data\Models\belt2.bmp",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"hair3.bmp") FileInstall ( "c:\Terisi\hair3.bmp", ""&$path&"\Terisi\data\Models\hair3.bmp",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"femaleCompleteMap3.bmp") FileInstall ( "c:\Terisi\femaleCompleteMap3.bmp", ""&$path&"\Terisi\data\Models\femaleCompleteMap3.bmp",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"jacket01.bmp") FileInstall ( "c:\Terisi\jacket01.bmp", ""&$path&"\Terisi\data\Models\jacket01.bmp",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"maleCompleteMap.bmp") FileInstall ( "c:\Terisi\maleCompleteMap.bmp", ""&$path&"\Terisi\data\Models\maleCompleteMap.bmp",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"necklace.bmp") FileInstall ( "c:\Terisi\necklace.bmp", ""&$path&"\Terisi\data\Models\necklace.bmp",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"shoes.bmp") FileInstall ( "c:\Terisi\shoes.bmp", ""&$path&"\Terisi\data\Models\shoes.bmp",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"thong.bmp") FileInstall ( "c:\Terisi\thong.bmp", ""&$path&"\Terisi\data\Models\thong.bmp",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Au3Irrlicht.dll") FileInstall ( "c:\Terisi\Au3Irrlicht.dll", ""&@SystemDir&"\Au3Irrlicht.dll",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Irrlicht.dll") FileInstall ( "c:\Terisi\Irrlicht.dll", ""&@SystemDir&"\Irrlicht.dll",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Updating regestry") RegWrite ( "HKEY_CURRENT_USER\SOFTWARE\Terisi" ,"", "REG_SZ", $path&"Terisi" ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Creating desktop shortcut") FileCreateShortcut ( ""&$path&"\Terisi\Terisi.exe", @DesktopDir&"\Terisi.lnk" ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Complete") GUICtrlSetData($progress,100) end() If $msg = $exit_button Then cancel() ElseIf $msg=$GUI_EVENT_CLOSE Then cancel() EndIf WEnd EndFunc Func cancel() $prog=0 $steps=2.7 $check=FileExists(""&$path&"\Terisi.ico") If $check=1 Then GUICtrlSetData($file,"Deleting Terisi.ico") FileDelete (""&$path&"\Terisi.ico" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\Terisi.exe") If $check=1 Then GUICtrlSetData($file,"Deleting Terisi.exe") FileDelete (""&$path&"\Terisi.exe" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\cstat.ini") If $check=1 Then GUICtrlSetData($file,"Deleting cstat.ini") FileDelete (""&$path&"\data\cstat.ini" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\chairS.ini") If $check=1 Then GUICtrlSetData($file,"Deleting chairS.ini") FileDelete (""&$path&"\data\chairS.ini" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\cskin.ini") If $check=1 Then GUICtrlSetData($file,"Deleting cskin.ini") FileDelete (""&$path&"\data\cskin.ini" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\cdat.ini") If $check=1 Then GUICtrlSetData($file,"Deleting cdat.ini") FileDelete (""&$path&"\data\cdat.ini" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Skls.ini") If $check=1 Then GUICtrlSetData($file,"Deleting Skls.ini") FileDelete (""&$path&"\data\Skls.ini" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\chairC.ini") If $check=1 Then GUICtrlSetData($file,"Deleting chairC.ini") FileDelete (""&$path&"\data\chairC.ini" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\cheight.ini") If $check=1 Then GUICtrlSetData($file,"Deleting cheight.ini") FileDelete (""&$path&"\data\cheight.ini" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\female2.3DS") If $check=1 Then GUICtrlSetData($file,"Deleting female2.3DS") FileDelete (""&$path&"\data\Models\female2.3DS" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\belt.3DS") If $check=1 Then GUICtrlSetData($file,"Deleting belt.3DS") FileDelete (""&$path&"\data\Models\belt.3DS" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\Jacket.3DS") If $check=1 Then GUICtrlSetData($file,"Deleting Jacket.3DS") FileDelete (""&$path&"\data\Models\Jacket.3DS" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\male2.3DS") If $check=1 Then GUICtrlSetData($file,"Deleting male2.3DS") FileDelete (""&$path&"\data\Models\male2.3DS" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\necklace.3DS") If $check=1 Then GUICtrlSetData($file,"Deleting necklace.3DS") FileDelete (""&$path&"\data\Models\necklace.3DS" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\shoes.3DS") If $check=1 Then GUICtrlSetData($file,"Deleting shoes.3DS") FileDelete (""&$path&"\data\Models\shoes.3DS" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\thong.3DS") If $check=1 Then GUICtrlSetData($file,"Deleting thong.3DS") FileDelete (""&$path&"\data\Models\thong.3DS" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\hair.3DS") If $check=1 Then GUICtrlSetData($file,"Deleting hair.3DS") FileDelete (""&$path&"\data\Models\hair.3DS" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\hair2.bmp") If $check=1 Then GUICtrlSetData($file,"Deleting hair2.bmp") FileDelete (""&$path&"\data\Models\hair2.bmp" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\hair4.bmp") If $check=1 Then GUICtrlSetData($file,"Deleting hair4.bmp") FileDelete (""&$path&"\data\Models\hair4.bmp" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\hair.bmp") If $check=1 Then GUICtrlSetData($file,"Deleting hair.bmp") FileDelete (""&$path&"\data\Models\hair.bmp" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\belt2.bmp") If $check=1 Then GUICtrlSetData($file,"Deleting belt2.bmp") FileDelete (""&$path&"\data\Models\belt2.bmp" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\hair3.bmp") If $check=1 Then GUICtrlSetData($file,"Deleting hair3.bmp") FileDelete (""&$path&"\data\Models\hair3.bmp" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\femaleCompleteMap3.bmp") If $check=1 Then GUICtrlSetData($file,"Deleting femaleCompleteMap3.bmp") FileDelete (""&$path&"\data\Models\femaleCompleteMap3.bmp" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\jacket01.bmp") If $check=1 Then GUICtrlSetData($file,"Deleting jacket01.bmp") FileDelete (""&$path&"\data\Models\jacket01.bmp" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\maleCompleteMap.bmp") If $check=1 Then GUICtrlSetData($file,"Deleting maleCompleteMap.bmp") FileDelete (""&$path&"\data\Models\maleCompleteMap.bmp" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\necklace.bmp") If $check=1 Then GUICtrlSetData($file,"Deleting necklace.bmp") FileDelete (""&$path&"\data\Models\necklace.bmp" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\shoes.bmp") If $check=1 Then GUICtrlSetData($file,"Deleting shoes.bmp") FileDelete (""&$path&"\data\Models\shoes.bmp" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&$path&"\data\Models\thong.bmp") If $check=1 Then GUICtrlSetData($file,"Deleting thong.bmp") FileDelete (""&$path&"\data\Models\thong.bmp" ) EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&@SystemDir&"\Au3Irrlicht.dll") If $check=1 Then GUICreate("Delete system files?",250,75) $yes=GUICtrlCreateButton("Yes",50,30,60,30) $no=GUICtrlCreateButton("No",130,30,60,30) GUISetState(@SW_SHOW) While 1 $msg2=GUIGetMsg() If $msg2=$yes Then GUICtrlSetData($file,"Deleting Au3Irrlicht.dll") FileDelete(""&@SystemDir&"\Au3Irrlicht.dll") $check=FileExists(""&$path&"\data\Models\Irrlicht.dll") If $check=1 Then GUICtrlSetData($file,"Deleting Irrlicht.dll") FileDelete(""&@SystemDir&"\Irrlicht.dll") EndIf GUIDelete() ExitLoop ElseIf $msg2=$no Then GUIDelete() ExitLoop EndIf WEnd EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Removing directories") DirRemove ( ""&$path&"",1 ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) $check=FileExists(""&@DesktopDir&"\Terisi.lnk") If $check=1 Then GUICtrlSetData($file,"Deleting shortcut") FileDelete(""&@DesktopDir&"\Terisi.lnk") EndIf $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Updating regestry") RegDelete ( "HKEY_CURRENT_USER\SOFTWARE\Terisi" , "" ) $prog=$prog+$steps GUICtrlSetData($progress,$prog) GUICtrlSetData($file,"Complete") GUICtrlSetData($progress,100) end() EndFunc Func end() If $button=2 Then GUICtrlDelete ( $path_input ) GUICtrlDelete ( $browse_button ) GUICtrlDelete ( $go_button ) GUICtrlDelete ( $exit_button ) ElseIf $button=1 Then GUICtrlDelete($uninstall) GUICtrlDelete($exit_button2) EndIf $done=GUICtrlCreateButton("Done",170,30,50,40) While 1 $msg=GUIGetMsg($install) Select Case $msg=$done Exit(1) Case $msg=$GUI_EVENT_CLOSE Exit(1) EndSelect WEnd EndFunc fileinstall only works once the script is comiled to an exe though. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
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