PDA

View Full Version : IsCmdBld -d VAR=value



blippen
06-15-2007, 09:17 AM
Hi,

I can't get the -d parameter to work with iscmdbld.exe.
I created a property XYZ in the property manager and put in a default value (default).
What I'm trying to do now is to set the value from the iscmdbld.exe.
>iscmdbld -d XYZ="test" -p project.ism

The compilation works without any error but the value hasn't changed.
When I run the following code:
MsiGetProperty(hMSI, "XYZ", svXYZ, nBuffer);
MessageBox("XYZ = " + svXYZ , INFORMATION);
it will display "default".

I found this on the macrovision site (http://www.macrovision.com/downloads/products/installshield/installshield/release_notes/is2008.shtml):
IOC-000052559
Passing a preprocessor definition to IsCmdBld.exe through the -d parameter now sets the new value.

Have I missed something??

Thanks,
Anders

RobertDickau
06-15-2007, 09:26 AM
I think -d is just for InstallScript preprocessor definitions; perhaps see if -z is what you want?

blippen
06-15-2007, 09:33 AM
Hi again,

After spending half a day to get the -d parameter to work. I was just about to go home for the weekend when I noticed the -z option.

Now it works (with the -z).

I wonder what the -d does? Thought it was the property that it set.


I have one other question regarding this.
In the help it seems that the ini file (passed with -i) doesn't support the -z. Is this the case?

/Anders

blippen
06-15-2007, 09:36 AM
Thanks for the fast reply Robert. Yes it was just what I was looking for.

Best Regards,
Anders

Kelter
06-15-2007, 11:13 AM
in my experience, it doesn't appear to do anything.

I have a basic MSI project with an Installscript CA (immediate execution) which is supposed to do

MsiSetProperty( hMSI, "BUILDNUMBER", BUILDNUM );

On the IsCmdBld.exe command line, i use the switch -d BUILDNUM=%BUIDLABEL% (yes, I echo this line beforehand for confirmation)

Also, the -h help is inconsistent with the help from the help file in that the help file says not to use a space between the -d and the definition, but actuially taking that advice results in an unknown swith "-dBUILDNUM=1234" error.

I finally worked around it by adding a line to my build script:

echo #define BUILDNUM %BUILDLABEL% > .\buildnum.h

and including buildnum.h in my project. Sloppy, i know.

RobertDickau
06-15-2007, 11:24 AM
Perhaps you could use -z directly instead of the two-step #define-then-MsiSetProperty?

Kelter
06-15-2007, 11:37 AM
That sounds like a fabulous idea. I would have tried that a month ago if it were mentioned anywhere in the documentation...

Actually, i just got "-1113: The 'z' switch is not recognized."

----EDIT----

Oops...i'm using IS 12...

*slips quietly out of the forum*