问题
I use a program called MSICREATE to generate msi packages for a piece of software. I then use orca to transform the msi package. Things work ok but users must delete the existing product before installing an update. I'd like to modify the msi package so the installer recognizes a newer or different version is being installed and removes the current version and then installs the new msi package.
What property table entries are needed?
=========
The answer given below has helped me get beyond my original problem and I thank Ciprian for his help. My major upgrade msi now deletes the existing product BUT does not completely re-install the product. My product consists of some text files, a help file, and a .exe file. The .exe file is not re-installed.
For whatever it's worth, I added answer below which summarizes what I added to my msi using orce.
回答1:
I don't know how MSICREATE handles the upgrade scenario. However you could achieve this using ORCA. Here is a detailed upgrade example from MSDN.
Long story short both your packages must share the UpgradeCode. Also you must author an entry in the Upgrade table of the second package.
回答2:
Here are the things I added to my msi using orca to effect a major upgrade. As I said above I still have a problem in that my .exe file is not reinstalled on a major upgrade. The .exe is added if one does a repair.
InstallExecuteSequence Table
- added FindRelatedProducts with sequence 400
- added RemoveExistingProducts with sequence 1450
InstallUISequence Table
- added FindRelatedProducts with sequence 200
PropertyTable
- added RemovePreviousVersions TRUE
- added SECURECUSTOMPROPERTIES SOLARUPGRADE
- had a existing UpgradeCode with guid created by MSICREATE
- had a existing ProductVersion 12.2.12.0 created my MSICREATE
Added a Upgrade Table
- UpgradeCode same value as Upgrade in Property Table
- VersionMin null
- VersionMax 99.12.31
- Attributes 1
- ActionProperty SOLARUPGRADE (same value as SECURECUSTOMPROPERTIES in Property Table)
I also assigned a new PackageCode and a new ProductCode so the new msi had different values of PackageCode, ProductCode, and ProductVersion than the previously installed product.
来源:https://stackoverflow.com/questions/9178402/msi-package-property-table-entries-to-enable-update-releases