如何允许用户安装 MSI 文件的多个副本? [英] How to allow users to install multiple copies of an MSI file?

查看:16
本文介绍了如何允许用户安装 MSI 文件的多个副本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想允许我的用户在一台 PC 上安装我的应用程序的多个副本;一种用于测试目的,一种用于生产系统.安装是直接在 Visual Studio 2005 中创建的 MSI 文件.有什么办法可以启用它吗?

I want to allow my users to install multiple copies of my application on a single PC; one for testing purposes and one for a production system. The install is an MSI file created directly in Visual Studio 2005. Is there any way to enable this?

我准备使用其他工具来生成安装,甚至使用 Ocra.exe 如果必须的话,可以直接使用,但现在至少 InstallShield 是不可能的.

I am up for using other tools to generate the install or even using Ocra.exe directly if I had to, but for now at least InstallShield is out of the question.

推荐答案

正如 slugster 所说,您需要更新 Property 表中的 ProductCode.您还需要更改 摘要流中的包代码信息.修改 MSI 的最简单方法是通过 VBScript 使用自动化.

As slugster has stated, you need to update the ProductCode in the Property table. You will also need to change the package code in the Summary Stream Information. The easiest way to modify your MSI is by using automation with VBScript.

Windows Installer SDK 包含有用的脚本(WiRunSQL.vbs, WiSumInf.vbs),如下所示:

The Windows Installer SDK contains useful scripts (WiRunSQL.vbs, WiSumInf.vbs) that will allow modify your MSI as follows:

更改产品代码

cscript WiRunSQL.vbs your.msi "UPDATE Property SET Value='{AAAAAAAA-BBB1-CCCC-DDDD-EEEEEEEEEEEE}' WHERE Property='ProductCode'"

更改包裹代码:

cscript WiSumInf.vbs your.msi 9={AAAAAAAA-BBB2-CCCC-DDDD-EEEEEEEEEEEE}

请注意新代码应该是一个有效的唯一 GUID.

Just note the new codes should be a valid unique GUID.

这篇关于如何允许用户安装 MSI 文件的多个副本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆