Passing user defined variables into a setup

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

Passing user defined variables into a setup

Postby Gareth Owen » Thu Jan 12, 2006 5:33 am

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:

Postby MichaelNesmith » Thu Jan 12, 2006 11:13 am

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
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Gareth Owen
Posts: 149
Joined: Fri Oct 21, 2005 8:42 am
Location: UK

Postby Gareth Owen » Thu Jan 12, 2006 11:32 am

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:

Postby MichaelNesmith » Thu Jan 12, 2006 11:55 am

The Replace String command works, but I am not sure if its much help...
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Jan 12, 2006 6:09 pm

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

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot] and 179 guests