I am trying to pass a variable as a parameter to an application from the installer.
reg.exe failed $SOMEVARIABLE$ "Error"
However, if the variable has spaces it needs to have quotes, but when I quote it it isn't passed as a variable.
Example:
If $SOMEVARIABLE$ = Hi How Are You
reg.exe failed $SOMEVARIABLE$ "Error"
passes Hi as the parameter in the 2nd spot, and How in the 3rd, etc.
reg.exe failed "$SOMEVARIABLE$" "Error"
passes $SOMEVARIABLE$ as parameter 2.
I want to have the value of $SOMEVARIABLE$ wrapped in ""
Pass variable to applicaiton
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
-
eugen.cocalea
- Posts: 15
- Joined: Tue Feb 17, 2009 12:54 pm
That didn't work it passed the value of
COMPANYINFO =LONG VALUE
I need it to pass the value of variable COMPANYINFO except in quotes.
If COMPANYINFO = The Bar
Then I want to pass (without varibles)
Run Program $COMMONFILES$\\PointOS\\reg.exe failed "The Bar" "Main Error"
I thought this would work, but it doesn't
Run Program $COMMONFILES$\\PointOS\\reg.exe failed "$COMPANYINFO$" "Main Error"
Am I doing something wrong? Is there a way to wrap the variable in quotes before I pass it?
Something like:
COINFO = " '+$COMPANYNAME$+' "
Then
Run Program $COMMONFILES$\\PointOS\\reg.exe failed $COMPANYINFO$ "Main Error"
Don't know how to do it, thanks for your help...
COMPANYINFO =LONG VALUE
I need it to pass the value of variable COMPANYINFO except in quotes.
If COMPANYINFO = The Bar
Then I want to pass (without varibles)
Run Program $COMMONFILES$\\PointOS\\reg.exe failed "The Bar" "Main Error"
I thought this would work, but it doesn't
Run Program $COMMONFILES$\\PointOS\\reg.exe failed "$COMPANYINFO$" "Main Error"
Am I doing something wrong? Is there a way to wrap the variable in quotes before I pass it?
Something like:
COINFO = " '+$COMPANYNAME$+' "
Then
Run Program $COMMONFILES$\\PointOS\\reg.exe failed $COMPANYINFO$ "Main Error"
Don't know how to do it, thanks for your help...

