4

I am very new to InstallShield and have inherited a InstallScript project. I have mostly figured out my way around and fixed most of the problems. However, I wish to build this project automatically on our build server with each build of our product. I have this working fine. For some reason, though, I cannot get the version number to increase.

I am using the command:

IsCmdBld.exe -P <.ism location>
-L <some_path_variable>=<some_value>
-L <some_path_variable2>=<some_value2>

This works.

However, adding -y 1.2.3, -y "1.2.3", -z Version=1.2.3, -z Version="1.2.3", -z "Version=1.2.3", -z ProductVersion=1.2.3, -z ProductVersion="1.2.3", or -z "ProductVersion=1.2.3". does not work.

When I say that it doesn't work, I mean that using the resulting installer does not attempt to do an upgrade like it would if I manually increased the Version string in the Product Properties table from inside InstallShield.

Is there something I am missing? I know I am not providing much to go on, just hoping someone has come across this problem before. Also, using the -c COMP switch does not work.

Any thoughts appreciated.

Brett Widmeier
  • 1,056
  • 1
  • 13
  • 22

2 Answers2

7

I believe IsCmdBld only supports passing ProductVersion properties for MSI projects, but not for InstallScript projects. I believe you need to do something like this prior to calling IsCmdBld:

set project = CreateObject("ISWiAuto15.ISWiProject") 
project.OpenProject "C:\test.ism"
project.ProductVersion = "2.0.0"
project.CloseProject
set project = nothing

Alternatively you can save your project type in XML format and use an XPath / XPoke to update the ProductVersion in the Property table. The syntax is a little scary because of the DTD, but it can be done.

Igor Popov
  • 9,795
  • 7
  • 55
  • 68
Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • Yeah, someone in the Acresso forums sent me down this route as well. I am doing what you suggest except that I call project.SaveProject before project.CloseProject, and I am doing it in c#. However, the save call throws a COMException. =/ I'll figure what is causing this exception eventually. – Brett Widmeier Feb 04 '10 at 16:56
  • 1
    Check if you're doing project.OpenProject "c:\test.ism", false so that you can modify the project. – Alonso Feb 10 '10 at 06:32
  • @Alonso Yeah, I was. The issue was that the original author didn't use IS 2009. So, opening up the project in IS 2009 and choosing Save As.. then changing a couple pointers resolved the problem. – Brett Widmeier Feb 10 '10 at 17:58
  • Ahhh. That works so much better than trying to use the command line builder. Thanks. – Scott P Mar 08 '10 at 22:57
4

This is an old question but I was finally able to figure out how to make it work from the command line for me so I thought I would share it. I created a Path Variable (VersionNumber in the example below) in the project and set the product version to that path variable in the "General Information" section.

Then you can set it at the command line using the -l flag.

ISCmdBld.exe -p project.ism -l VersionNumber=1.1.0
Eric Milas
  • 1,807
  • 2
  • 18
  • 29