I hope this isn't against the rules somehowBut you were too lazy to find out what the rules actually said before posting the links to decompilers. I ought to ban you permanently, but I will limit the sanction to 1 calendar month.
Any further offence of any kind from you will lead to your immediate and permanent removal from the community - I hope that is quite clear. Cookies, Please read the (there is also a link at bottom right of each page) before posting again - you are allowed one free bust and you have just used yours. Thread obviously locked.
Compiling Scripts with Aut2Exe Compiling Scripts with Aut2Exe It is possible to take your.au3 script and compile it into a standalone executable; this executable can be used without the need for AutoIt to be installed and without the need to have AutoIt3.exe on the machine. The compilation process converts the script and its files, plus any files added by the function, into a tokenised form which is then compressed and encrypted. In that way none of these additional files are required at runtime. Depending on the compilation option chosen, this ' compiled' script will either be inserted into the resources of a stand-alone executable interpreter which will run it directly or saved in.a3x format.
An.a3x file can be included in another script or run by an AutoIt interpreter - either Autoit3.exe itself or another compiled script with the AutoItExecuteAllowed flag set. Caution: the script to be compiled must be free of syntax error as the compilation process does not check the syntax. Aut2Exe can be used in three ways: Method 1 - Start Menu Only available if full install performed. Open the Start Menu and browse to the AutoIt v3 group.
A while ago I posted a short description on how to decompile 64-bit autoit scripts.Someone pinged me asking on how to actually do it, so I thought it will be handy to simply write a script to do the dirty work for us.
Click Compile Script to.exe 3. The main Aut2Exe interface should appear. Use the Browse buttons to select your input (.au3) and output (.exe) files.
If you like you can change the icon of the resulting.exe - just browse to the icon you want (some example icons are supplied in Program Files AutoIt3 Aut2Exe Icons). The only other option you might wish to change is the compression level (especially if using FileInstall to add extra files). Use the Compression menu to set this. As with all compression routines the better the compression you select the slower it will be. However, no matter what compression level you select the decompression speed (when the.exe is run) is the same.
Click on Convert to compile the script. Note: Scripts can be compiled with.a3x extension. They should be run with AutoIt.exe filename.a3x.
The.a3x contains the script itself with all referred #include plus the FileInstall files. This format allows you to distribute smaller files as they don't include the AutoIt3.exe in each compiled script. You still need to have it accessible on the target machine but just AutoIt3.exe.
Method 2 - Right Click Only available if full install performed. In Explorer browse to the.au3 file that you wish to compile. Right-click the file to access the pop-up menu. The file will be silently compiled with the same filename - just with a.exe extension. When compiling in this way, Aut2Exe uses current icon/compression settings (from the last time Aut2Exe was run manually as in method 1). Method 3 - The Command Line The Aut2Exe.exe program can be run from the command line as follows: Aut2exe. Au3 / out outfile.
Exe / icon iconfile. Ico / comp 0 4 / nopack / x64 / bin binfile. Bin Where Switch Usage Default value /in Specifies the path and file name of the bin file to be used to compile the file.
The file must be specified /out Specifies the path and name of the compiled file. Specifies the path and file name when creating an.a3x file. The input filename with a.exe extension /icon Specifies the path and file name of the icon to use for the compiled file. Default icon /comp Specifies the compression level to be used when encoding the script (This is NOT related to UPX). It must be a number between 0 (none) and 4 (maximum). 2 /nopack Specifies that the file should not be compressed with UPX after compilation.
Pack /pack Specifies that the file should be compressed with UPX after compilation. Pack /x64 Specifies that the script should be compiled for use on systems with x64 (64-bit) architecture. See notes /x86 Specifies that the script should be compiled for use on systems with x86 (32-bit) architecture. See notes /console Specifies that the script should be compiled as a Console application.
Windows application (/gui) /gui Specifies that the script should be compiled as a Windows application. Windows application (/gui) Command Line Examples /in c: myscript.au3 /out c: myapp.exe /icon c: myicon.ico /x64 Will result in the creation of c: myapp.exe with normal compression which will use the specified icon and be compiled for use on x64 system architecture. /in c: myscript.au3 will result in the creation of a unicode c: myscript.exe with normal compression which will use the default AutoIt icon for use on win32 systems. Command Line Notes Long filenames should be enclosed in double-quotes like 'C: Program Files Test test.au3'.
With the exception of /in all switches are optional. By default, the 32-bit compiler produces a 32-bit binary and the 64-bit compiler produces a 64-bit binary.
Use the /x86 and /x64 parameters to explicitly specify the output. The /pass and /nodecompile switches are redundant as of version 3.2.8.1.
They will be ignored if used and have been removed from this list. The /ansi and /unicode switches are redundant as of version 3.3.0.0. The /bin switch is redundant as of version 3.3.10.0 and has been removed from this list. Technical Details The compiled script and additional files added with FileInstall are compressed with my own (Jon) compression scheme.