| *Tip: Examples of how to compile EXE files from the command line are provided at the bottom of this page. |

*Tip:
You can preset the options for any script: simply include a comment line with the command-line options.
This is helpful if you have many scripts, each with different compile settings.
A comment such as the following will automatically set the desired options when you compile:
![]() The command line can be obtained from the Compile dialog:
|
| Screen Item | Description | |
| Output File |
The name you want the compiled program to have. This will always have an .EXE (executable) extension. You can overwrite another existing program if desired. If the designated EXE program already exists and is running, the compile will fail. |
|
| Platform |
Windows will create a Win32 application (a standard Windows program) Console will create a character-based application (like a MS-DOS program) DLL will create a Dynamic Link Library If you are unsure of which to pick, choose "Windows". Note that not all options are available for Console and DLL, due the technical restrictions of these platforms.
|
|
| Icon |
Any icon you want may be included in the compiled program. Full-color and multiple device/dimension icons (such as tiles and small icons) are possible. Choose other icons from .ICO, .EXE, or .DLL type files (icon, program, or resource files). If you want the default icon, check the "Use Default Windows or vTask" option. The default Windows icon saves about 15k due to the size of the high-color vTask icon. |
|
| Use Compression for smallest output size |
This feature will create the smallest possible EXE file size. It uses compression and an EXE packing method to achieve approximately 50% smaller output size. If you are experiencing problems when running your EXE, do not use this compression feature. |
|
| Package image files inside of program |
This option will include externally referenced image files into your program. Only files that physically exist at the time of compile can be embedded. Files that do not exist at the time of compile, or use variables that cannot be expanded, are unable to be embedded. vTask will attempt to minimize the number of images that are packaged into the EXE, for situations where the same image is reused multiple times (by more than one step in the script). This number of "reused package file links" is reported after the compile. There are two types of files that can be embedded: Image Files All actions that use images, such as "Wait for Image" or "Display Image", can use embedded image files. The physical image is stored uncompressed as a resource inside in the compiled EXE. Data Files The Read File action can read the contents of an embedded data file. By design, this is the only action that utilizes embedded data files, to avoid assumptions about files that may later exist or are dynamically created at run time. If you want to use embedded data files with other actions, 1) use the Read File action and save the contents of the embedded file into a variable, and then 2) use the Write File to create a new file. In other words, the Read File action acts like an extraction command for embedded data files. This architecture allows complete control over embedded file manipulation. If an error occurs while embedding, a number of things could be the cause. Here is a list of some of the things that could cause failure while embedding files:
|
|
| Single Instance (only run 1 copy at a time) |
This option will only allow one copy of the program to run at the same time. When another copy of the EXE is started, it will close if it sees that it is already running. This feature is important when automatically launching the compiled EXE from a batch file or automated process, and you don't want multiple copies of it running. |
|
| Encrypt script source (do not allow decompile) |
This option will create an EXE that cannot be read, opened, or decompiled by vTask or any other program. This means that the source script used to create your program can't be viewed by someone using vTask. Use of this feature also implies that you should always keep a copy of your VXM source script, since the original steps can't be extracted from an encrypted EXE (even by vTask). |
|
| Version Information |
This section allows you to put in custom information that will mark the EXE.
This information is then available in Windows Explorer:
![]() You can now do any variation of version numbers:
"5"
"1.2"
"10.0.0.1"
"0.0.0.3"
"1.2.3"
|
| *Tip:
A command line switch can begin with either a dash (-) or a forward slash (/), therefore "-c" and "/c" are synonymous.
|
| Command Line Switch | Purpose | Example |
| -c | The source VXM file to compile. This is a required switch. | -c C:\MyFile.vxm |
| -o | The output filename | -o c:\MyProgram.exe |
| -icon (or -i) | Sets the icon options filename for an EXE, DLL, or ICO file that contains an icon |
-icon c:\somefile.exe |
| -compress (or -z) | Activates the Compression option as described in the preceding section. | -compress (no options) |
| -package_i -package_d (or -pi, -pd) |
Packages (embeds) all external image (-pi) and data (-pd) files into the program | -pi (no options) |
| -single (or -s) | Activates the "run one copy" feature of an EXE as described in the preceding section | -single (no options) |
| -encrypt (or -e) | The EXE is encrypted so that the original script steps can't be accessed by decompiling the EXE | -encrypt (no options) |
| -version (or -v) | Sets the Version string | -version 1.2 |
| -description (or -d) | Sets the Description string (use single quotes) | -description 'This is my program' |
| -copyright (or -y) | Sets the Copyright string (use single quotes) | -copyright 'Copyright © 2009 My Company' |
| -quiet (or -q) | Supresses all output unless an error occurs | -quiet (no options) |
| -WIN32 | Creates a Windows program (default) | -WIN32 (no options) |
| -CONSOLE | Creates an MS-DOS character-based program | -CONSOLE (no options) |
| -DLL | Creates a Windows Dynamic Link Library (DLL) | -DLL (no options) |
*Tip:
To easily obtain the complete command line switches needed for a compile, use the vTask "Compile EXE" feature.
It has a box which contains the switches being used, which can be copied with the "Copy" button:![]() |
