cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JerryFlood
Level 3

Passing a string to an InstallScript from the IsCmdBld command line

Hi

I am trying to pass a string containing spaces to an InstallScript from the IsCmdBld command line. I was able to use -d option with, however, when a string is passed that contains spaces (eg -d ARG="abc 123") the compiler fails because there string get substituted withou quotes. I have tried several variations to force in the quotes to no avail. (eg ARG='"abc 123"', ARG=""acb 123"", ARG="\"abc 123\""...)

In an attempt to used the -z option, I added Add New Property in the InstallScript which placed the following code and some other functions in my setup.rul.

property(get,put) STRING VersionString();
STRING m_strVersionString;

This appeared simnple enough, however, this appears to have opened a whole new level of complexity with PropertyBags and object instances.

Unless the -z is simpler than it appears (perhaps all I need is the PropertyBag insance for the InstallScript Properties?), I would prefer to solve the problem using -d as this presents the least violent update to the project.

The ReadProperties is executing in the debugger. When specifying -z "ARG=abc 123" on the command line. The the variable set by the ReadStringProperty in the ReadProperties is a null string.

Thanks
Jerry
Labels (1)
0 Kudos
(1) Reply
JerryFlood
Level 3

Apparently the ARG='"abc 123"' does work (note enclosing the double quotes within the single quotes).

Just ignore the following message that is generated by IsCmdBld. It appears to be benign.

Can't define symbol using ARG='abc 123'
0 Kudos