Passing user defined variables into a setup

Got a problem you cannot solve? Try here.
Post Reply
Gareth Owen
Posts: 149
Joined: Fri Oct 21, 2005 8:42 am
Location: UK

Passing user defined variables into a setup

Post 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 :?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Gareth Owen
Posts: 149
Joined: Fri Oct 21, 2005 8:42 am
Location: UK

Post by Gareth Owen »

Thought as much

Will wait with baited breath,
any possible workarounds for now? :)
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

The Replace String command works, but I am not sure if its much help...
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply