ChrisL 13 Posted May 29, 2006 (edited) I know that you can use the decompiler but if you wanted to include the script file as a safe guard then put this at the top of your script.Replace "Put the name of the au3 file here.au3" with your file name and add a password in to the password variable.To recover the script, launch your exe with the command line "recover", so either create a shortcut with the recover parameter or from the command prompt "Myfile.exe recover" you will then be prompted for the password, if they match then the au3 file will be written to your current script directory.For ease of use you could add it to your template.au3 file in your "C:\Documents and Settings\UserName\Templates" directoryUpdate: based on dabus' version which is less work, well done!$password = "MyPassword" If $CMDLINE [0] > 0 and $CMDLINE [1] = "recover" Then $check = InputBox ("Recover", "Password?","", "*") If $Check = $password then FileInstall ("Put the name of the au3 file here.au3", StringtrimRight (@ScriptFullPath, 4) & "_rec.au3" ) MsgBox (0,"Output File",StringtrimRight (@ScriptFullPath, 4) & "_rec.au3" ,5) Else MsgBox (0,"Error","Incorrect password" ,5) EndIf Exit EndIf ; Script Start - Add your code below here Edited June 9, 2008 by ChrisL Hide ChrisL's signature Hide all signatures [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Share this post Link to post Share on other sites
dabus 0 Posted May 29, 2006 Why don't you do $password = "MyPassword" If $CMDLINE [1] = "recover" Then $check = InputBox ("Recover", "Password?","", "*") If $Check = $password then FileInstall ("Put the name of the au3 file here.au3", StringtrimRight (@ScriptFullPath, 4) & "_rec.au3" ) Exit EndIf ? First steps seem to be quit useless to me. Share this post Link to post Share on other sites
ChrisL 13 Posted May 29, 2006 First steps seem to be quit useless to me.No, the first part includes the file in the compiled exe at compile time.The second part allows you to recover the script from compile time with a password from the exe. Hide ChrisL's signature Hide all signatures [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Share this post Link to post Share on other sites
RazerM 0 Posted May 29, 2006 Why don't you do ?First steps seem to be quit useless to me.Yes i have tried yours and it works. The compiler adds all files ignoring conditions. But it only extracts them if the condition surrounding them is true Hide RazerM's signature Hide all signatures My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Share this post Link to post Share on other sites
ChrisL 13 Posted May 29, 2006 (edited) Yes appologies dabus you are correct. $password = "MyPassword" If $CMDLINE [0] > 0 and $CMDLINE [1] = "recover" Then $check = InputBox ("Recover", "Password?","", "*") If $Check = $password then FileInstall ("Put the name of the au3 file here.au3", StringtrimRight (@ScriptFullPath, 4) & "_rec.au3" ) MsgBox (0,"Output File",StringtrimRight (@ScriptFullPath, 4) & "_rec.au3" ,5) Else MsgBox (0,"Error","Incorrect password" ,5) EndIf Exit EndIf ; Script Start - Add your code below here Edited May 29, 2006 by ChrisL Hide ChrisL's signature Hide all signatures [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Share this post Link to post Share on other sites
bluebearr 1 Posted September 2, 2006 I usually just do this: If StringInStr($cmdlineRaw, "/MySecretRecoverSwitch") Then ; Recover the source FileInstall("Source.au3", @TempDir & "\Source.au3", 1) EndIf Hide bluebearr's signature Hide all signatures BlueBearrOddly enough, this is what I do for fun. Share this post Link to post Share on other sites
dandymcgee 0 Posted September 10, 2006 for even more enhanced security you could always change $CMDLINE [1] = "recover" . Just change "recover" to something harder to guess, and then it'll be kind of double passworded. Just an idea Hide dandymcgee's signature Hide all signatures - Dan [Website] Share this post Link to post Share on other sites
DirtDBaK 0 Posted November 27, 2007 Great Idea I really like this! Hide DirtDBaK's signature Hide all signatures [center][/center] Share this post Link to post Share on other sites