![]()
|
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
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:
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
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.
NOTE
You must specify the full URL with these parameters in order for them to apply correctly.
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
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".
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."
The /x option causes Setup.exe to uninstall a previously installed product.
The /uninst option causes Setup.exe to execute only the event handler function OnUninstall, whose default code uninstalls the previously installed product.
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.
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".
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.
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".)
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).
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.
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.)
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".
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".
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.
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".
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".
The /v option is used to pass command-line options and values of public properties through to Msiexec.exe.
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.
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".
For an InstallScript project, running the command Setup.exe /d runs the installation program with the InstallScript debugger.
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:
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.
Specifies the amount of time (in seconds) by which initialization of the installation is delayed after Setup.exe is launched.
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 problemssuch as Remote Procedure Call (RPC) errorsthat 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).
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).
This parameter indicates that the original setup should wait for the cloned setup process to complete before exiting.
Specifies that a self-extracting package's files should not be run but simply extracted to the location that is specified by <path>.
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
The Setup.exe created by earlier versions of InstallShield - Windows Installer Edition used the /f option to repair an installation.
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.
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
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.
Supresses the display of the splash screen if one is included.
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.
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 launcherthat 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.
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 WindowsInstaller based installations (including InstallScript MSI installations) or Setup.exe /L0007 for InstallScript installations.
For a Basic MSI project, the /w option forces Setup.exe to wait until the installation is complete before exiting.
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
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.
|
|
copyright contact |