This is a special directive that controls special Aut2Exe properties that affect how the resulting script is compiled to an .exe. For example, changing the file properties or file icon.
Directive | Parameters | Description | Example |
---|---|---|---|
Out | Filename | Sets the file name of the compiled executable. | #pragma compile(Out, AutoIt_Example.exe) |
Icon | Filename | Sets the compiled executable icon. | #pragma compile(Icon, \..\back2.ico) |
ExecLevel | none, asInvoker, highestAvailable, requireAdministrator | Sets the execution level in the compiled executable manifest. | #pragma compile(ExecLevel, highestavailable) |
UPX | true, false (default) | Compresses the compiled executable using UPX. | #pragma compile(UPX, false) |
AutoItExecuteAllowed | true, false (default) | Allows the compiled executable to execute non compiled scripts. | #pragma compile(AutoItExecuteAllowed, true) |
Console | true, false (default) | Compile the executable in console mode. | #pragma compile(Console, false) |
Compression | 1, 3, 5, 7, 9 | Sets the compiled executable FileInstall() resources compression. | #pragma compile(Compression, 3) |
Compatibility | vista, win7, win8, win81, win10 | Sets the compatibility in the compiled executable manifest. | #pragma compile(Compatibility, win10) |
x64 | true, false (default) | Compiles the executable in 64-bits. | #pragma compile(x64, false) |
inputboxres | true, false (default) | Includes/omits the InputBox() resources from the compiled executable. | #pragma compile(inputboxres, false) |
Comments | Comment remarks with quotes or without | Sets a comment to the compiled executable. | #pragma compile(Comments, 'Some, ''Apostrophe'') |
CompanyName | Company name remark with quotes or without | Sets a company name to the compiled executable. | #pragma compile(CompanyName, 'AutoIt') |
FileDescription | File description with quotes or without | Sets a file description to the compiled executable. | #pragma compile(FileDescription, AutoIt is a freeware BASIC-like scripting language.) |
FileVersion | File version with the last parameter being optional | Sets a file version to the compiled executable. | #pragma compile(FileVersion, 1.2.3.4, 11.12.13.14) |
InternalName | Internal name with or without quotes | Sets an internal name to the compiled executable. | #pragma compile(InternalName, "Internal Name") |
LegalCopyright | Legal copyright remark with or without quotes | Sets a legal copyright to the compiled executable. | #pragma compile(LegalCopyright, Legal stuff here) |
LegalTrademarks, | Legal trademark comment with or without quotes | Sets a legal trademark to the compiled executable. | #pragma compile(LegalTrademarks, '"Trademark something, and some text in "quotes" and stuff') |
OriginalFilename | Filename | Sets an original filename to the compiled executable. | #pragma compile(OriginalFilename, OriginalName.exe) |
ProductName | Product name remark with or without quotes | Sets a product name to the compiled executable. | #pragma compile(ProductName, No Name) |
ProductVersion | File version with the last parameter being optional | Sets a product version to the compiled executable. | #pragma compile(ProductVersion, 0.1.3.7, 6.7.4.3) |