Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to allow users to install multiple copies of an MSI file?

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?

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.

like image 987
Eric W Avatar asked Nov 13 '09 22:11

Eric W


1 Answers

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.

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

To change the product code

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

To change the package code:

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

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

like image 55
KMoraz Avatar answered Sep 28 '22 02:09

KMoraz