What are Upgrade, Product and Package Codes used for? By pusu

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

Author:  pusu

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. http://msdn.microsoft.com/en-us/library/aa370854(VS.85).aspx. 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.
时间: 2024-10-17 04:53:22

What are Upgrade, Product and Package Codes used for? By pusu的相关文章

From MSI to WiX, Part 8 - Major Upgrade, by Alex Shevchuk

Following content is reprinted from here, please go to the original website for more information. Author: Alex Shevchuk Introduction A typical Major Upgrade removes a previous version of an application and installs a new version.  This blog will guid

[转]Ubuntu Precise - Install youtube-dl package using Quantal repo

Ubuntu Precise - Install youtube-dl package using Quantal repo Ubuntu Precise 12.04 currently contains in repository youtube-dl version 2012.02.27-1. As of recent YouTube changes this package version is not usable anymore but there is an updated vers

【LeetCode刷题Java版】Maximum Product Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has the largest product = 6. package com.liuhao.acm.leetcode; /** * @a

Spring MVC -- 验证器

输入验证是Spring处理的最重要Web开发任务之一.在Spring MVC中,有两种方式可以验证输入,即利用Spring自带的验证框架,或者利用JSR 303实现.本篇博客将介绍这两种输入验证方法. 本篇博客用两个不同的示例分别介绍这两种方式:spring-validator和jsr303-validator. 一 验证概览 Converter和Formatter作用于字段级.在MVC Web应用中,它们将String类型转换或格式化成另一种Java类型,如java.time.LocalDat

Azure 基础:用 PowerShell 自动发布 CloudServices

在软件的开发过程中,自动化的编译和部署能够带来很多的优势.下面我们聊聊如何自动发布云应用程序到 azure 上的 cloud services. 打包要发布的内容 首先使用 msbuild 编译 *.ccproj 文件,我们需要使用生成产物中的:app.publish\xxx.cspkgapp.publish\yyy.cscfg 下载 publishsettings 文件 使用你的 Azure 账号登录下面的地址,就可以下载 publishsettings 文件(国际版):https://man

Java Web之网上购物系统(注册、登录、浏览商品、添加购物车)

眼看就要期末了,我的专业课也迎来了第二次的期末作业---------<网上购物系统>.虽然老师的意图是在锻炼我们后台的能力,但是想着还是不利用网上的模板,准备自己写,以来别人写的静态页看不懂,再着可以锻炼自己做网页的能力.所以趁有点小进展就想分享自己的作业进展状态.下面是我页面运行的截图. 可能粘贴的图片没有任何的效果可言,下面.jsp字体可以运行你想要的页面效果. index.jsp register.jsp login.jsp product.jsp 后台代码: User.java pac

windows7命令帮助大全

有关某个命令的详细信息,请键入 HELP 命令名ASSOC 显示或修改文件扩展名关联.ATTRIB 显示或更改文件属性.BREAK 设置或清除扩展式 CTRL+C 检查.BCDEDIT 设置启动数据库中的属性以控制启动加载.CACLS 显示或修改文件的访问控制列表(ACL).CALL 从另一个批处理程序调用这一个.CD 显示当前目录的名称或将其更改.CHCP 显示或设置活动代码页数.CHDIR 显示当前目录的名称或将其更改.CHKDSK 检查磁盘并显示状态报告.CHKNTFS 显示或修改启动时间

saltstack使用cmd.run批量更改ntp统一时间

[[email protected] salt]# salt-key  Accepted Keys: hddcluster1 hddcluster2 hddcluster3 hddcluster4 salt-master salt-minion01 Denied Keys: Unaccepted Keys: Rejected Keys: 查看操作系统版本以及版本号 [[email protected] salt]# salt '*' grains.item  os osrelease  salt

Eclipse下面的Maven管理的SSH框架整合(Struts,Spring,Hibernate)

搭建的环境:eclispe下面的maven web项目 Struts:    2.5.10 Spring:    4.3.8 Hibernate:   5.1.7 .Final MySQL:   5.1.30 先来详细的讲解一下SSH框架的整合,在这里是将struts2.0的Action的创建工作由Spring进行统一管理,主要是利用了Spring 控制反转和依赖注入的功能. 而将hibernate.cfg.xml整合Spring的配置文件中.而且利用Spring的面向切向功能对Hibernat