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

IsCmdBld -d VAR=value

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
Labels (1)
0 Kudos
(6) Replies
RobertDickau
Flexera Alumni

I think -d is just for InstallScript preprocessor definitions; perhaps see if -z is what you want?
0 Kudos
blippen
Level 3

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
0 Kudos
blippen
Level 3

Thanks for the fast reply Robert. Yes it was just what I was looking for.

Best Regards,
Anders
0 Kudos
Kelter
Level 10

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.
0 Kudos
RobertDickau
Flexera Alumni

Perhaps you could use -z directly instead of the two-step #define-then-MsiSetProperty?
0 Kudos
Kelter
Level 10

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*
0 Kudos