Page 1 of 1

Getting Installer to Receive Command-line Parameters

Posted: Mon May 31, 2010 5:03 pm
by dencolp
Hi InstallAware Gurus,

Thank you in advance for your help.

Please consider the following basic procedure:

- Create a very basic installer called, say, mysetup.exe.
- Initialize a variable called MYVAL to an empty string.
- Write the value of $MYVAL$ to a text file.
- From the command-line (cmd.exe), run: mysetup.exe MYVAL=TRUE
- Curiously, after mysetup.exe runs, the text file does not contain "TRUE" as you would expect it to.
- Uninstall mysetup.exe
- From the command-line (cmd.exe), run: mysetup.exe /s MYVAL=TRUE
- Now the text file does contain "TRUE"

This proves that you need to add "/s" to ensure your command-line variables are received.

Is there a way to get the installer to receive your command-line variables if you are NOT running in silent mode.

Thanks,
Dencolp.

Re: Getting Installer to Receive Command-line Parameters

Posted: Mon May 31, 2010 6:05 pm
by MichaelNesmith
That is correct - command line variables lock out script commands such as Set Variable from changing variable values assigned from the command line only when setup is running silently.

Otherwise, you can use the $CMDLINE$ pre-defined variable, and the Parse String commands to inspect the setup command line.