cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What Command-Line Parameters Are Available for Setup.exe?

What Command-Line Parameters Are Available for Setup.exe?

Summary

This article gives information about what command-line parameters are available for Setup.exe.

Synopsis

This article gives information about what command-line parameters are available for Setup.exe built with Legacy InstallShield versions. The article applies to InstallScript and InstallScript MSI Project Types.


Discussion

Following is the list of command line parameters that can be used with Setup.exe. These switches are optional, but note that either a slash (/) or a dash (-) must precede the command line parameters.

ParameterDescription
>-dRuns setup in debug mode. The -d switch also includes a <PATHONLY> option for specifying the path of the Setup.rul file. For more information, refer to the Visual Debugger help file.
-f<PATH\COMPILEDSCRIPT>Specifies an alternate compiled script. Unless the compiled script (.ins file) also resides in the same directory as that of Setup.exe, the full path to the compiled script must be specified. _setup.dll must also reside in the same directory as your .ins file. For example, setup -ftest.ins will launch setup using Test.ins instead of Setup.ins.
-f1<PATH\RESPONSEFILE>Specifies an alternate location and name of the response file (.iss file). If this option is used when running InstallShield Silent, the response file is read from the folder/file specified by <PATH\RESPONSEFILE>. If this option is used along with the -r option, the response file is written to the folder/file specified by <PATH\RESPONSEFILE>. If an alternate compiled script is specified using the -f switch, the -f1 switch entry must follow the -f switch entry.
-f2<PATH\LOGFILE>Specifies an alternate location and name of the log file created by InstallShield Silent. By default, Setup.log log file is created and stored in the same directory as that of Setup.ins. If an alternate compiled script is specified using the -f switch, the -f2 switch entry must follow the -f switch entry.
-m<FILENAME>Causes Setup.exe to generate a Management Information Format (.mif) file automatically at the end of the setup. Do not include a path - the .mif file is always placed in the Windows folder. <FILENAME> is optional. If you do not specify a filename, the resulting file will be called Status.mif.
-m1<SERIAL number>Tells setup to place the indicated serial number in the created .mif file.
-m2<LOCALE string>Tells setup to place the indicated locale in the .mif file. English (ENU) is the default; refer to Microsoft documentation for a complete listing of locale strings.
-rCauses Setup.exe automatically to generate a silent setup file (.iss file), which is a record of the setup input, in the Windows folder.
-sRuns InstallShield Silent to execute a silent setup.
-SMSPrevents a network connection and Setup.exe from closing before the setup is complete. This switch works with setups originating from a Windows NT server over a network. Please note that SMS must be uppercase; this is a case-sensitive switch.
-zPrevents Setup.exe from checking the available memory during initialization. This switch is necessary when running a setup on a machine with more than 256 MB of memory; if it is not used, Setup.exe reports insufficient memory and exits.
-uninstThe -uninst option causes Setup.exe to execute only the event handler function OnUninstall, whose default code uninstalls a previously installed product.
-removeonlyThe -removeonly option sets the REMOVEONLY system variable equal to a non-zero value. The default code for the OnMaintUIBefore event handler function conditionally displays the SdWelcomeMaint dialog box, depending on the value of REMOVEONLY.
-deleterUse this option when debugging a DLL function that is called from your installation script. This option specifies that Setup.exe does not clone a second Setup.exe process to perform the actual work of the installation. (By default, Setup.exe clones a second process, so that it properly uninstalls applications from machines on which no InstallScript installation had previously been run.)
-extract_all:<path>Specifies that a self-extracting package's files should not be run but simply extracted to the location that is specified by <path>.
-delayedstart:<number of seconds>Using the -delayedstart option is recommended when manually launching an additional setup after reboot (for example, by using the RunOnce key). The delay allows the operation system to initialize completely; this prevents the problems?such as Remote Procedure Call (RPC) errors?that can occur if a setup initializes before the operating system has initialized completely. The recommended delay length is 30 seconds.

Note that this option is not needed when the setup starts automatically after reboot (for example, due to a call to SdFinishReboot before reboot).
-hide_usdSuppresses display of the dialog box that is displayed by an update-enabled setup to let the end user select which of multiple installations of your product will be updated. This dialog box is displayed by default when an update-enabled setup detects multiple previous installations. When this command line option is used and an update-enabled setup detects multiple previous installations, the setup updates the first previous installation that it finds.
-ig<INSTANCE_GUID>Specifies the value of the system variable INSTANCE_GUID; for example, -ig{722C7440-B317-4B3B-AECA-0199EA4E7CDB}. If this option is not used, the setup automatically assigns a value to INSTANCE_GUID (for multi-instance setups, this value is a newly generated GUID; for standard setups, this value is the same as the value of PRODUCT_GUID). This option is useful if you have created a setup launcher?that is, a custom application that runs before your setup does to perform pre-setup tasks, such as determining the instance GUID that you want to use for the setup. Do not specify anything other than a valid GUID with this option.
-l<language ID>Specifies the language in which the setup runs. <language ID> is a numeric language ID of the form 0xnnnn or simply nnnn. The setup runs in this language regardless of the default setup language specified in the IDE or the default language of the target system.

Please note the following:

  • Setup.exe command line parameters are not case sensitive; upper case or lower case letters can be used.
  • Separate multiple command line switches with a space, but do not put a space inside a command line switch (for example, /r /fInstall.ins is valid, but not /r/f Install.ins).

When using long path and filename expressions with switches, enclose the expressions in double quotation marks. The enclosing double quotes tell the operating system that spaces within the quotation marks are not to be treated as command line delimiters.

User-defined command line arguments can also be used in InstallShield 5.x Professional. These command line arguments are copied to the system variable CMDLINE at run time. User defined command line arguments must be specified before specifying any predefined Setup options. Like predefined command line switches, you can pass these arguments directly to Setup.exe, place them in Setup.ini, or (for testing purposes while you are using the InstallShield IDE) place them in the Setup Settings dialog box.

Basic MSI or InstallScript MSI projects

Note: Along with the command line switches listed above, -c, -e, -q, -t, -x, and -zi are command line switches reserved by InstallShield. User redefinition of these command line switches, both upper- and lowercase, can cause errors.Note: The list of parameters above includes command line switches for Professional 5.x, 6.x and 7.x as well as DevStudio 9.x and InstallShield X. The command-line parameters "-SMS" and "-z" are specific switches for Professional 5.x only.


Additional Information

For the current command-line parameters Setup.exe can accept including Basic MSI and InstallScript MSI (formerly Standard) projects, reference article

Setup.exe and Update.exe Command Line Parameters.

Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Nov 07, 2007 06:35 PM
Updated by: