从IsCmdBld.exe设置InstallShield 2009 InstallScript项目的版本

时间:2021-09-14 05:53:11

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.

我是InstallShield的新手,并继承了一个InstallScript项目。我大部分都想通了解决大部分问题。但是,我希望在我们的构建服务器上使用我们产品的每个版本自动构建此项目。我有这个工作正常。但是出于某种原因,我不能让版本号增加。

I am using the command:

我正在使用命令:

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

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

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.

但是,添加-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”,或-z“ProductVersion = 1.2.3”。不起作用。

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.

当我说它不起作用时,我的意思是使用生成的安装程序不会尝试进行升级,就像我从InstallShield手动增加Product Properties表中的Version字符串一样。

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.

有什么我想念的吗?我知道我没有提供太多的东西,只是希望有人之前遇到过这个问题。此外,使用-c COMP开关不起作用。

Any thoughts appreciated.

任何想法都赞赏。

2 个解决方案

#1


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:

我相信IsCmdBld仅支持为MSI项目传递ProductVersion属性,但不支持为InstallScript项目传递。我相信在调用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.

或者,您可以将项目类型保存为XML格式,并使用XPath / XPoke更新Property表中的ProductVersion。由于DTD,语法有点可怕,但可以做到。

#2


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.

这是一个老问题,但我终于能够弄清楚如何让它从命令行运行,所以我想我会分享它。我在项目中创建了一个Path Variable(下例中的VersionNumber),并在“General Information”部分中将产品版本设置为该路径变量。

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

然后,您可以使用-l标志在命令行中进行设置。

ISCmdBld.exe -p project.ism -l VersionNumber=1.1.0

#1


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:

我相信IsCmdBld仅支持为MSI项目传递ProductVersion属性,但不支持为InstallScript项目传递。我相信在调用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.

或者,您可以将项目类型保存为XML格式,并使用XPath / XPoke更新Property表中的ProductVersion。由于DTD,语法有点可怕,但可以做到。

#2


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.

这是一个老问题,但我终于能够弄清楚如何让它从命令行运行,所以我想我会分享它。我在项目中创建了一个Path Variable(下例中的VersionNumber),并在“General Information”部分中将产品版本设置为该路径变量。

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

然后,您可以使用-l标志在命令行中进行设置。

ISCmdBld.exe -p project.ism -l VersionNumber=1.1.0