Setting Version of InstallShield 2009 InstallScript project from IsCmdBld.exe

China☆狼群 提交于 2021-02-08 16:59:42

问题


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.


回答1:


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.




回答2:


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


来源:https://stackoverflow.com/questions/2156128/setting-version-of-installshield-2009-installscript-project-from-iscmdbld-exe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!