Page 1 of 1

Passing user defined variables into a setup

Posted: Thu Jan 12, 2006 5:33 am
by Gareth Owen
I would like to be able to pass specific variables into the setup program.

I know that you can use the setup.exe VAR1=....... option to do this, but I have one problem.

How do i use this variable in the code.

If i try to use it in an if statement then I cannot build the install as the variable has not been defined.

If i define the variable in script it over writes the value passed into the setup.

Any ideas :?

Posted: Thu Jan 12, 2006 11:13 am
by MichaelNesmith
Hi Gareth

The proper way to do this is to define the variable in your script, and then specify it from the command line again. Variables that have been defined on the command line will be locked for the duration of script execution - no script commands will be able to overwrite them, so this mechanism works well.

That said, I just gave this a test run, and it doesn't seem to be working as designed. I'll have to escalate this as well to the product team, seems like something is going wrong here, or maybe something simple we're missing out.

Posted: Thu Jan 12, 2006 11:32 am
by Gareth Owen
Thought as much

Will wait with baited breath,
any possible workarounds for now? :)

Posted: Thu Jan 12, 2006 11:55 am
by MichaelNesmith
The Replace String command works, but I am not sure if its much help...

Posted: Thu Jan 12, 2006 6:09 pm
by MichaelNesmith
Apparently, this is as designed. For command line variable specifications to permanently override script commands, the setup must be running in silent mode. If setup is not silent, the script can overwrite values specified on the command line.

The workaround therefore for non-silent setups is to parse the command line. The Parse String function problem has been resolved to help with this. Thank you for reporting. An update will be made available soon.