PreviousNext
Help Library

Setup.exe and Update.exe Command-Line Parameters

InstallShield 12

Like your compiled .msi file, Setup.exe can accept a number of command-line parameters. Update.exe (available only for MSI projects) accepts nearly all of the same command-line parameters. Using these parameters, end users can specify such data as the language that the installation should run in and whether to launch Setup.exe silently. End users can also pass parameters through Setup.exe to the included .msi file.

Note

NOTE

Command-line options that require a parameter must be specified with no space between the option and its parameter. For example, Setup.exe /v"ALLUSERS=2" is valid, while Setup.exe /v "ALLUSERS=2" is not. Quotation marks around an option's parameter are required only if the parameter contains spaces. If a path within a parameter contains spaces, you may need to use quotation marks within quotation marks, as in the following example: Setup.exe /v"INSTALLDIR=\"c:\My Files\"".

Several of the command-line options apply only to InstallScript MSI projects or InstallScript projects.

Setup.exe accepts the following command-line parameters associated with the following project types:

InstallScript and InstallScript MSI Projects

Special Installation Modes

Silent Installations

SMS Data

Debugging

Miscellaneous

User-Defined Command-Line Switches

Along with the command-line switches listed above, -bd, -f, and -zi are command-line switches reserved by InstallShield. User redefinition of these command-line switches, either upper- or lowercase, can cause errors.

You can define your own command-line arguments, which are copied to the system variable CMDLINE at run time. 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

Note

NOTE

Setup.exe initializes correctly even on systems with more than 256 MB of memory and always stays in memory until the setup is complete. Due to the nature of DOS, when you launch Setup.exe from the command line, a DOS prompt is quickly returned although Setup.exe is still in memory.

InstallScript MSI Projects Only

Basic MSI and InstallScript MSI Projects

Special Installation Modes

Silent Installations

Download and Cache Locations

Note

NOTE

You must specify the full URL with these parameters in order for them to apply correctly.

Passing Data to the Installation

Miscellaneous

Special Installation Modes

/a : Administrative installation (Basic MSI and InstallScript MSI projects)

Note

NOTE

The /a parameter does not work with Update.exe. Update.exe launches a patch that accesses and modifies an existing cached MSI on the system, and an administrative installation does not cache the MSI.

The /a option causes Setup.exe to perform an administrative installation. An administrative installation copies (and uncompresses) your data files to a directory specified by the user, but it does not create shortcuts, register COM servers, or create an uninstallation log.

Tip

TIP

If an installation contains setup prerequisites and you want to extract them from Setup.exe, add a path after the /a parameter to extract the prerequisites to that location. A sample command is Setup.exe /a"C:\temp".

/j : Advertise mode (Basic MSI and InstallScript MSI projects)

The /j option causes Setup.exe to perform an advertised installation. An advertised installation creates shortcuts, registers COM servers, and registers file types, but does not install your product's files until the user invokes one of these "entry points."

/x : Uninstall mode (Basic MSI and InstallScript MSI projects)

The /x option causes Setup.exe to uninstall a previously installed product.

/uninst : Uninstall product (InstallScript and InstallScript MSI projects)

The /uninst option causes Setup.exe to execute only the event handler function OnUninstall, whose default code uninstalls the previously installed product.

/removeonly : Uninstall product (InstallScript and InstallScript MSI projects)

The /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.

Silent Installations

/p : Specify password (Basic MSI and InstallScript MSI projects)

If you selected the Password Protect Setup.exe option in the Release Wizard for your release, the user must specify the password with the /p option at run time. A typical command is Setup.exe /s /p"password".

/r : Record mode (InstallScript and InstallScript MSI projects)

In order to run an InstallScript MSI or InstallScript project installation program in silent mode, you must first run Setup.exe with the /r option to generate a response file, which stores information about the data entered and options selected by the user at run time.

Running an InstallScript MSI or InstallScript installation program with the command Setup.exe /r displays all the run-time dialog boxes, and stores the data in a file called Setup.iss, created inside the system's Windows folder. To specify an alternative response file name and location, use the /f1 option, described below.

Basic MSI projects do not create or use a response file for silent installations.

/s : Silent mode

For an InstallScript MSI or InstallScript project, the command Setup.exe /s runs the installation in silent mode, by default based on the responses contained in a response file called Setup.iss in the same directory. (Response files are created by running Setup.exe with the /r option.) To specify an alternative file name or location of the response file, use the /f1 option, described below.

The command Setup.exe /s also suppresses the Setup.exe initialization window for a Basic MSI installation program, but it does not read a response file. To run a Basic MSI product silently, run the command line Setup.exe /s /v/qn. (To specify the values of public properties for a silent Basic MSI installation, you can use a command such as Setup.exe /s /v"/qn INSTALLDIR=D:\Destination".)

/f1 : Specify alternative response file name and path (InstallScript and InstallScript MSI projects)

Using the /f1 option enables you to specify where the response file is (or where it should be created) and what its name is, as in Setup.exe /s /f1"C:\Temp\Setup.iss". Specify an absolute path; using a relative path gives unpredictable results. The /f1 option is available both when creating a response file (with the /r option) and when using a response file (with the /s option).

/f2 : Specify alternative log file name and path (InstallScript and InstallScript MSI projects)

When running an InstallScript MSI or InstallScript installation in silent mode (using the /s option), the log file Setup.log is by default created in the same directory and with the same name (except for the extension) as the response file. The /f2 option enables you to specify an alternative log file location and file name, as in Setup.exe /s /f2"C:\Setup.log". Specify an absolute path; using a relative path gives unpredictable results.

SMS Data

/m : Generate .mif file (InstallScript and InstallScript MSI projects)

The /m option causes Setup.exe to generate an SMS Management Information Format (.mif) file. A typical command is Setup.exe /m"SampleApp". (Including the ".mif" file extension is not necessary.)

/m1 : Specify serial number in .mif file (InstallScript and InstallScript MSI projects)

Using the /m1 parameter (along with /m) enables you to specify a serial number to be written to the .mif file. A typical command is Setup.exe /m"SampleApp" /m1"1234-5678".

/m2 : Specify locale string in .mif file (InstallScript and InstallScript MSI projects)

Using the /m2 parameter (along with /m) enables you to specify a locale string to be written to the .mif file. A typical command is Setup.exe /m"SampleApp" /m2"ENU".

Download and Cache Locations (Basic MSI and InstallScript MSI projects)

/ua : Specify URL for InstMsiA.exe
/uw : Specify URL for InstMsiW.exe

In the Release Wizard, you can specify download locations for the Windows Installer installers InstMsiA.exe and InstMsiW.exe. A user can specify an alternative URL at run time using the /ua and /uw options, as in Setup.exe /uw"http://www.otherlocation.com/engines". The file name is not necessary.

/um : Specify URL to .msi package

In the Release Wizard, for a Downloader build, you can specify a download location for your .msi database. A user can specify an alternative URL using the /um option, as in Setup.exe /um"http://www.otherlocation.com/packages/product.msi".

/b : Cache installation locally

In the Release Wizard, for a Downloader build, you can specify whether to cache the contents of a compressed package on the local system. With the /b option, the user can specify the directory in which to cache the installation files, as in Setup.exe /b"C:\CacheDirectory".

Passing Data to the Installation

/v : Pass arguments to Msiexec (Basic MSI and InstallScript MSI projects)

The /v option is used to pass command-line options and values of public properties through to Msiexec.exe.

/v"ISSCRIPTCMDLINE=\"<Option1> <Option2>\"" : Pass arguments that should be passed to the script (Basic MSI projects only)

This option specifices command-line parameters to be passed to the script. Any property supported by InstallScript MSI (where appropriate) can be specified. (The most common ones are /d and /z.)

For example, the following indicates that you want to debug the script, and that the CMDLINE variable should contain TEST.

Setup.exe /v"ISSCRIPTCMDLINE=\"-d -zTEST\""

Note that as shown above, when you want to specify that a double quote character is not a delimiter for the command line but a delimiter for the property, use \".

Note also that as with any public Windows Installer property, this property should be specified with all uppercase letters.

/z : Pass arguments to CMDLINE variable (InstallScript MSI projects only)

The /z option is used to pass data to the InstallScript system variable CMDLINE, as in Setup.exe /z"My Custom Data", after which the variable CMDLINE would contain the string "My Custom Data".

Debugging

/d : Debug

For an InstallScript project, running the command Setup.exe /d runs the installation program with the InstallScript debugger.

Note

NOTE

Debugging InstallScript code requires the debug-information file Setup.dbg to be available. To debug an InstallScript project on a system other than the development system:

  1. Copy the InstallScript debugger executable ISDbg.exe (located in the System folder of your InstallShield distribution) to the test system, and register it by launching the executable with the /REGSERVER command-line option.
  2. Copy Setup.dbg to the test system.
  3. Run Setup.exe with the command Setup.exe /d"<path>", where path is the directory containing Setup.dbg.

For a Basic MSI project, the command Setup.exe /v"ISSCRIPTDEBUG=1 ISSCRIPTDEBUGPATH=\"path-to-Setup.dbg\"" runs your InstallScript custom actions in the InstallScript debugger.

Miscellaneous

/delayedstart:<number of seconds> : Delay initialization of the installation (InstallScript projects only)

Specifies the amount of time (in seconds) by which initialization of the installation is delayed after Setup.exe is launched.

Tip

TIP

Using the -delayedstart option is recommended when manually launching an additional installation 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 an installation initializes before the operating system has initialized completely. The recommended delay length is 30 seconds.

Note that this option is not needed when the installation starts automatically after reboot (for example, due to a call to SdFinishReboot before reboot).

/runfromtemp : Always clone and run from the temporary directory (Basic MSI, InstallScript, and InstallScript MSI projects)

This parameter allows the setup author to always clone the setup and run it from the temporary directory, even if the setup does not meet the conditions for running from the temporary directory. This parameter is ignored if the setup is a self-extracting executable file (.exe).

/clone_wait : Wait for the cloned setup process to complete before exiting (InstallScript projects only)

This parameter indicates that the original setup should wait for the cloned setup process to complete before exiting.

/extract_all:<path> : Package's files should not be run but simply extracted (InstallScript projects only)

Specifies that a self-extracting package's files should not be run but simply extracted to the location that is specified by <path>.

/f : Specify alternative compiled script (InstallScript and InstallScript MSI projects)

By default, Setup.exe looks for a compiled script file named Setup.inx. To specify a different name for the compiled script file, use the /f option, as in Setup.exe /f"script.inx".

Note

NOTE

The Setup.exe created by earlier versions of InstallShield - Windows Installer Edition used the /f option to repair an installation.

/h : Clone release to a temporary location and run from that location (Basic MSI and InstallScript MSI projects)

The build engine automatically creates an installation that supports Setup.exe cloning in cases where cloning is required (for example, multi-disk installations). If you need to do this manually, pass /h to Setup.exe and it will clone itself to a temporary location and run from that location.

/hide_progress : Suppress all progress dialogs (Basic MSI, InstallScript, and InstallScript MSI projects)

Suppresses the display of any small and standard progress dialogs that might be shown during initialization.

The small progress dialog is usually used for installations that display a splash screen during initialization, since a standard-size progress dialog does not leave any space for the splash screen. Specifying the /hide_progress option hides the small progress dialog for those installations, so end users would see just the splash screen without any progress indication.

Note

NOTE

For InstallScript installations: If you specify /hide_progress and include a splash screen in your InstallScript installation, the length of time that the splash screen is displayed depends on whether SmallProgress=Y or SmallProgress=N is specified in Setup.ini.

For InstallScript MSI installations: If you include a splash screen, the installation automatically switches to the small progress dialog, and the splash screen is shown only during the time that the progress dialog is displayed. Note that this is true even if /hide_progress is specified. Threrefore, Macrovision recommends that you avoid using /hide_progress with a splash screen in InstallScript MSI installations.

/hide_splash : Suppress splash screen (InstallScript and InstallScript MSI projects)

Supresses the display of the splash screen if one is included.

/hide_usd : Suppress update dialog for multiple installations (InstallScript projects only)

Suppresses display of the dialog that is displayed by an update-enabled installation to let the end user select which of multiple installations of your product will be updated. This dialog is displayed by default when an update-enabled installation detects multiple previous installations. When this command-line option is used and an update-enabled installation detects multiple previous installations, the installation updates the first previous installation that it finds.

/ig : Specify the value of the system variable INSTANCE_GUID (InstallScript projects only)

Specifies the value of the system variable INSTANCE_GUID; for example, -ig{722C7440-B317-4B3B-AECA-0199EA4E7CDB}. If this option is not used, the installation automatically assigns a value to INSTANCE_GUID (for multi-instance installations, this value is a newly generated GUID; for standard installations, this value is the same as the value of PRODUCT_GUID). This option is useful if you have created an installation launcher—that is, a custom application that runs before your installation does to perform pre-setup tasks, such as determining the instance GUID that you want to use for the installation. Do not specify anything other than a valid GUID with this option.

/L : Setup language

Users can use the /L option with the decimal language ID to specify the language used by a multi-language installation program. For example, the command to specify German is Setup.exe /L1031 for Windows–Installer based installations (including InstallScript MSI installations) or Setup.exe /L0007 for InstallScript installations.

/w : Wait (Basic MSI and InstallScript MSI projects)

For a Basic MSI project, the /w option forces Setup.exe to wait until the installation is complete before exiting.

Tip

TIP

If you are using the /w option in a batch file, you may want to precede the entire Setup.exe command-line option with start /WAIT. A properly formatted example of this usage is as follows:

start /WAIT setup.exe /w

/SMS : Wait (InstallScript MSI projects only)

For an InstallScript MSI project, Setup.exe automatically waits for the installation to finish before exiting, so this option (used by earlier versions of InstallShield Professional) is no longer necessary.




Macrovision Corporation
copyright
contact