Page 2 of 2

Re: Using custom variables in Command line installs

Posted: Thu Feb 23, 2012 8:39 am
by ckaware
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?

Re: Using custom variables in Command line installs

Posted: Wed Mar 06, 2013 2:39 am
by deploy
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...??

Re: Using custom variables in Command line installs

Posted: Wed Mar 06, 2013 10:36 am
by FrancescoT
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