Code: Select all
setup.exe PARAM1=value PARAM2=value
In my script I want to use PARAM1 if it was specified, otherwise I want to use my own default.
First I need to define the variable in my script:
Code: Select all
Set Variable PARAM1 to $PARAM1$
(I set it to $PARAM1$ so that I don't loose the value from the command line)
Now PARAM1 either contains the value that was specified on the command line or the string "$PARAM1$".
Next I want to set my default:
Code: Select all
If Variable PARAM1 equals $PARAM1$
Set Variable PARAM1 to my default value
end
This will obviously not work as it is always true - but how do I specify "$PARAM1$" (the string, not the variable) in the if command? Is the some escape character for the $?
Thanks!