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

IsCmdBld.exe difficulties

Hello,

I am pretty new to InstallShield, and am having difficulties getting IsCmdBld.exe to do what I want it to. Currently, I am having success building my InstallScript project like so:

IsCmdBld.exe -P <.ism location> -L = -L =


However, I am not successful when trying to use -B , -C COMP, -Y , or -Z =. The -B flag isn't very important to me, as I have other ways of moving the installer to where I want it to be. -C COMP I can, also, live without as this installer will only be used internally. However, I need either -Y or -Z to work. I need the build server to be able to build my installer and pass in the build number in some fashion.

Example of -Y not working:
I changed the version in the IDE to 1.2.3, then built and installed. Then, built again this time with IsCmdBld.exe passing it -y 1.2.4. When I used this installer, it did not try to upgrade as desired.

Example of -Z not working:
I install a using version 1.2.3 like described above. Then, I alter my InstallScript to read in the property TESTPROP and use that value for comparing with the currently installed version number to determine whether or not to do an upgrade. My code is like so:

function ReadProperties(PropertyBag)
int nResult; ;
begin
nResult = ReadStringProperty(PropertyBag, "TESTPROP", m_strTESTPROP);
end;

function STRING get_TESTPROP()
begin
return m_strTESTPROP;
end;

function OnSetUpdateMode()
...
sVersionBeingInstalled = get_TESTPROP();
IFX_PRODUCT_VERSION = sVersionBeingInstalled;


After that last line I show you, there is logic that is known to work.

I am not sure if this matters, but if stepthrough this code, ReadStringProperty returns a negative number despite this InstallShield 2009 documentation claiming that it always returns 0.

http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=installshield15langref-ReadStringPropertyhtm5&sliceId=&docTypeID=DT_MACROVISIONHELPNET_1_1&dialogID=78633680&stateId=0%200%2078631405
Labels (1)
0 Kudos
(5) Replies
DebbieL
Level 17

-c, -y, and -z are supported in Windows Installer–based projects, but not in InstallScript projects.

For your InstallScript project, consider using the automation interface if you want to increment the product version for each build. The ISWiProject object of the automation interface has a ProductVersion property that you can use to read and update the product version.
0 Kudos
DebbieL
Level 17

btw, the ability to use -y with ISCmdBld.exe to change the product version in an InstallScript project is logged as IOC-000073613 in our tracking system.
0 Kudos
bwidmeier
Level 3

Thanks Debbie!

So, just to be clear, you are suggesting that in my build script I execute a VBScript file to edit my .ism file via the ISWiProject object before I build the installer?
0 Kudos
DebbieL
Level 17

Yes, that's the idea. You could use VBScript, or pretty much any programming language that supports COM. The automation interface would enable you to open the project, modify the product version (and other settings, if needed), and save the project. You could even use the Build method of the automation interface to build a release (instead of using the ISCmdBld.exe), if you want.

The community forums and the help have some sample code to help you get started.
0 Kudos
bwidmeier
Level 3

Makes sense. Thanks again for your help.
0 Kudos