CMDLINE

InstallShield 2022 » InstallScript Language Reference

The CMDLINE variable varies, depending on the project type.

CMDLINE in InstallScript Projects

In InstallScript projects, Setup.exe accepts all user-defined command-line arguments and assigns them to the system string variable CMDLINE at run time.

Note:CMDLINE stores only user-defined command-line arguments. InstallShield command-line arguments (predefined arguments) are not copied to CMDLINE.

CMDLINE in InstallScript Installations That Are Included in Advanced UI and Suite/Advanced UI Projects as InstallScript Packages

Data can be passed to an InstallScript package through the package’s Command Line and Silent Command Line settings in the Advanced UI or Suite/Advanced UI project that contains the InstallScript package. The data can then be parsed from the CMDLINE variable in the Advanced UI or Suite/Advanced UI script events. For more information, see OnSuiteShowUI.

CMDLINE in InstallScript MSI Projects

In InstallScript MSI projects, any command-line data that are passed to Setup.exe with the /z switch are stored in the system string variable CMDLINE. For example, if the user runs the following command line, CMDLINE is set to the string My custom data.

Setup.exe /z"My custom data"

CMDLINE in Basic MSI Projects

In Basic MSI projects, you can pass public properties through Setup.exe to Msiexec.exe using the /v command-line argument.

See Also