Command Line Arguments
Previous Top Next


Thinstall can be used to supply a command line to your program in one of three modes:

· Don't modify command line arguments (default)

· Supply command line if none is supplied by the user
In this mode, if the user supplies any command line parameters they will be passed unchanged to your program. If no command line parameters are suppplied then the default command line parameters are used.

· Always supply command line (override any user supplied command-line)
In this mode, all command line arguments supplied by the user are overwritten with your default command line parameters.


clip0022

How Thinstall supplies command line arguments

If Thinstall needs to change the command line parameters it will invoke a second copy of your EXE with the new parameters and exit the current copy. If the program is a command-line program, the first copy waits for the second copy to exit first and returns the error code from the second program. In some cases this arrangement could have adverse effects for GUI applications, for example if another program launches EXE and waits for it to finish.

Uses for supplying command line arguments

Example 1. MP3 to EXE. Thinstall can be used to bundle an Mp3 player along with an MP3 file. By specifying a command line argument with the name of the bundled file, the mp3 will begin playing when the user runs the EXE file.

Example 2. Compiling Scripts. Thinstall can be used to link a script interpreter such as Perl or Phython along with a script file and any needed runtime libraries/DLLs. By supplying a command line argument, you can tell the script interpreter to begin executing your script when the EXE is run.