Using custom variables in Command line installs

Got a problem you cannot solve? Try here.
ckaware
Posts: 125
Joined: Thu Mar 17, 2011 11:43 am

Re: Using custom variables in Command line installs

Postby ckaware » Thu Feb 23, 2012 8:39 am

Obliterator wrote:I use variables via the command line without problem.
They work for me without requiring silent mode.
However, this might be down to the way I use the variables.
Rather than assigning them a default value, I check for them being defined like so:

if Variable MYVAR is Defined
... use the command line variable
else
... do something else
end

I can then simply call with a command line parameter to set the variable:
Setup.exe MYVAR=TRUE


How do you get around the "VARIABLE NOT DEFINED" on compile?

deploy
Posts: 30
Joined: Mon Jan 14, 2013 1:39 am

Re: Using custom variables in Command line installs

Postby deploy » Wed Mar 06, 2013 2:39 am

Obliterator wrote:I use variables via the command line without problem.
They work for me without requiring silent mode.
However, this might be down to the way I use the variables.
Rather than assigning them a default value, I check for them being defined like so:

if Variable MYVAR is Defined
... use the command line variable
else
... do something else
end

I can then simply call with a command line parameter to set the variable:
Setup.exe MYVAR=TRUE


Spot on! This was just what I was looking for, thanks Obliterator!

Now for the big question.. How to pass parameters when running in debug mode via the IDE...??

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Using custom variables in Command line installs

Postby FrancescoT » Wed Mar 06, 2013 10:36 am

Dear User,

if you need to verify if a variable is assigned correctly when passed from command line, you can also use a MessageBox at runtime to display its value.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 62 guests