博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
What are Upgrade, Product and Package Codes used for? By pusu
阅读量:4608 次
发布时间:2019-06-09

本文共 3158 字,大约阅读时间需要 10 分钟。

 

Following content is reprinted from , please go to the original website for more information.

 

Author:   

 

Recently I am working with Windows Installer and think ProductCode, UpgradeCode and PackageCode are very basic but very important concepts, so I make a conclusion here for references. Both ProductCode and UpgradeCode can be viewed from Property table in MSI package, and PackageCode can be reviewed from View->Summary information if you view MSI through Orca (which is shipped with Windows SDK.)

What is UpgradeCode in the MSI package?

The upgrade code is the unique GUID of identifying a family of a product. That is, the same products with different versions have probably been shipped for a few releases. These products have different ProductCodes, but they are linked together by using SAME UpgradeCode. For example, assuming that we wrote a product called "Happy MSI" and this product only has one MSI package for deployment on client system. The first release of this product is actually the MSI package with name "version_1.msi", and the second release is "version_2.msi". Then, these two MSI must have same UpgradeCode. When users run "version_2.msi" on their system, the windows installer will use the UpgradeCode to decide if previous versions of this product are already present on the system. Installer API "MsiEnumRelatedProducts()" uses the UpgradeCode to query all the family products.

What is ProductCode in MSI Package?

The product code is the unique GUID of identifying an application or product release; In other words, different versions and languages of Product must have different product codes. . Also, ProductCode can be used to query feature state, and product state. For example,  installer API "MsiQueryFeatureStateEx()" and "MsiQueryProductState()", etc.

What is PackageCode in MSI Package?

Similar, the package code is the unique GUID identifying a particular Windows Installer package. Here, package mapps to a physical file with extension name ".MSI". Remember, a product consists of one or multiple (MSI) packages, and one package also can be shared among different products. The combination of ProductCode and PackageCode is used to determine if the users want to reinstall the product or not. I found the book "The Definitive Guide to Windows Installer" has the best explaination on this. There are four scenarios:

  • If you install same product (same ProductCode) from the same package (same PackageCode), it means you want to go to "repair" or "uninstall" mode.
  • If you install same product (same ProductCode) from the different package (different PackageCode), it is not allowed. You willl get message "Another version of this product is already installed", and you have to remove the existing installed product before you install the new one.
  • If you install different product (different ProductCode) from the package (same PackageCode), it would go into maintenance mode and ask for a repair or remove.
  • If you install different product (different ProductCode) from the package (different PackageCode), the installer will think it is a NEW product and let you go ahead.

转载于:https://www.cnblogs.com/cindy-hu-23/p/4806607.html

你可能感兴趣的文章
前端开发在线小工具
查看>>
Hadoop 使用Combiner提高Map/Reduce程序效率
查看>>
前言 转录组
查看>>
局域网内访问机器时出现“未授予在次计算机上的请求登陆类型”
查看>>
Bogart BogartAutoCode.vb
查看>>
hdu - 2266 How Many Equations Can You Find (简单dfs)
查看>>
UIView属性
查看>>
将博客搬至CSDN
查看>>
远程服务器git搭建
查看>>
牛人们的博客地址
查看>>
Zabbix是什么?
查看>>
Dede推荐文章与热点文章不显示?
查看>>
Linux --Apache服务搭建
查看>>
20145325张梓靖 实验三 "敏捷开发与XP实践"
查看>>
JavaScript面试题
查看>>
[转帖]架构师眼中的高并发架构
查看>>
ios的一些开源资源
查看>>
HTTP 错误 500.21 - Internal Server Error 解决方案
查看>>
Bucks sign Sanders to $44 million extension
查看>>
【PHP】Windows下配置用mail()发送邮件
查看>>