I'm trying to generate an MSP out of the latest and previous MSIs as in the scenario below:
我正在尝试使用以下场景中的最新和之前的MSI生成MSP:
- The previous MSI is fixed and used as a baseline.
- 先前的MSI是固定的并用作基线。
- The latest MSI is generated with the new modification on the files included everynight and it will get a new ProductVersion on every generation (which happens with every build on the server).
- 最新的MSI是通过每晚包含的文件的新修改生成的,它将在每一代产生新的ProductVersion(在服务器上的每次构建时都会发生)。
- The previous MSI that is the baseline is installed on the machine; let's say it has version 1.0.0.0.
- 作为基线的先前MSI安装在机器上;假设它有版本1.0.0.0。
- The MSP generated on the first build is installed successfully, now the product version is 1.0.0.1.
- 在第一个版本上生成的MSP已成功安装,现在产品版本为1.0.0.1。
- The latest MSI now is 1.0.0.2 and has new modifications in it and we want to generate a new MSP to get those modifications to the machine, the MSP is generated based on the difference between previous MSI 1.0.0.0 and latest which is now 1.0.0.2.
- 最新的MSI现在是1.0.0.2,并且有新的修改,我们希望生成一个新的MSP来对机器进行修改,MSP是根据之前的MSI 1.0.0.0和最新版本(现在是1.0)之间的差异生成的.0.2。
The problem is that we are getting an error when trying to install the second MSP saying:
问题是我们在尝试安装第二个MSP时遇到错误:
Un-installation of the package is not supported.
不支持卸载软件包。
And below is the error log:
以下是错误日志:
MSI (s) (78:EC) [07:57:01:214]: Final Patch Application Order:
MSI (s) (78:EC) [07:57:01:214]: {C39177DC-24FD-432E-9D50-159E7E3CC62C} - C:\temp\[Package Name].msp
MSI (s) (78:EC) [07:57:01:214]: Other Patches:
MSI (s) (78:EC) [07:57:01:214]: Unknown\Absent: {9BEBFF56-7735-4618-BF01-01E96548FA81} -
MSI (s) (78:EC) [07:57:01:214]: Product: [Package Name] - Update '[Package Name]' could not be removed. Error code 1646.
Additional information is available in the log file C:\Users\Administrator\Desktop\msp.log.
MSI (s) (78:EC) [07:57:01:214]: Windows Installer removed an update. Product Name: [Package Name]. Product Version: 1.3.0.0.81.159. Product Language: 1033.
Manufacturer: [Company]. Update Name: [Package Name]. Removal success or error status: 0.
MSI (s) (78:EC) [07:57:01:214]: Product: [Package Name] - Update '{C39177DC-24FD-432E-9D50-159E7E3CC62C}' could not be installed. Error code 1646.
Additional information is available in the log file C:\Users\Administrator\Desktop\msp.log.
MSI (s) (78:EC) [07:57:01:214]: Windows Installer installed an update. Product Name: [Package Name]. Product Version: 1.3.0.0.81.159. Product Language: 1033.
Manufacturer: [Company]. Update Name: {C39177DC-24FD-432E-9D50-159E7E3CC62C}. Installation success or error status: 1646.
MSI (s) (78:EC) [07:57:01:214]: Product: [Package Name] -- Installation failed.
MSI (s) (78:EC) [07:57:01:214]: Windows Installer installed the product. Product Name: [Package Name]. Product Version: 1.3.0.0.81.159. Product Language: 1033.
Manufacturer: [Company]. Installation success or error status: 1646.
Uninstallation of the update package is not supported.
C:\Windows\Installer\5d9684f.msi
Is this allowed to do? Or do we have to change the previous MSI on each MSP installation, so we keep each MSP with distinct files only?
允许这样做吗?或者我们是否必须在每个MSP安装上更改以前的MSI,因此我们只为每个MSP保留不同的文件?
1 个解决方案
#1
1
Error 1646 implies that you're attempting to uninstall a patch that's not marked as uninstallable. There's not enough info to know if that is the case, sosome guesswork here.
错误1646意味着您正在尝试卸载未标记为可卸载的修补程序。没有足够的信息知道是否是这种情况,sosome猜测在这里。
In general your approach looks correct. The baseline is always 1.0.0 and the patch is always built as the delta betwen that base and each new MSI file. Your comment "..the MSP is generated based on the difference between previous MSI 1.0.0.0 and latest which is now 1.0.0.2." is a little misleading because the previous MSI was 1.0.0.1 in your examples. Perhaps you meant the base 1.0.0.0.
一般来说,您的方法看似正确。基线始终为1.0.0,并且补丁始终构建为该基础和每个新MSI文件之间的增量。您的评论“...... MSP是根据之前MSI 1.0.0.0和最新版本1.0.0.2之间的差异生成的。”有点误导,因为你的例子中以前的MSI是1.0.0.1。也许你的意思是基础1.0.0.0。
So you always build the patch as the delta between base and latest MSI, always create a new patch guid, and hopefully you're not changing the MSI ProductCode.
因此,您始终将补丁构建为基础和最新MSI之间的增量,始终创建新的补丁guid,并希望您不会更改MSI ProductCode。
However, your ProductVersion examples don't match what's in the log. Product Version: 1.3.0.0.81.159 is not a valid version:
但是,您的ProductVersion示例与日志中的内容不匹配。产品版本:1.3.0.0.81.159不是有效版本:
https://msdn.microsoft.com/en-us/library/aa370859(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/aa370859(v=vs.85).aspx
so you can't rule out the possibility that the invalid versions are related to the error, especially if all the actual MSI versions are 1.3.0.0.
所以你不能排除无效版本与错误相关的可能性,特别是如果所有实际的MSI版本都是1.3.0.0。
#1
1
Error 1646 implies that you're attempting to uninstall a patch that's not marked as uninstallable. There's not enough info to know if that is the case, sosome guesswork here.
错误1646意味着您正在尝试卸载未标记为可卸载的修补程序。没有足够的信息知道是否是这种情况,sosome猜测在这里。
In general your approach looks correct. The baseline is always 1.0.0 and the patch is always built as the delta betwen that base and each new MSI file. Your comment "..the MSP is generated based on the difference between previous MSI 1.0.0.0 and latest which is now 1.0.0.2." is a little misleading because the previous MSI was 1.0.0.1 in your examples. Perhaps you meant the base 1.0.0.0.
一般来说,您的方法看似正确。基线始终为1.0.0,并且补丁始终构建为该基础和每个新MSI文件之间的增量。您的评论“...... MSP是根据之前MSI 1.0.0.0和最新版本1.0.0.2之间的差异生成的。”有点误导,因为你的例子中以前的MSI是1.0.0.1。也许你的意思是基础1.0.0.0。
So you always build the patch as the delta between base and latest MSI, always create a new patch guid, and hopefully you're not changing the MSI ProductCode.
因此,您始终将补丁构建为基础和最新MSI之间的增量,始终创建新的补丁guid,并希望您不会更改MSI ProductCode。
However, your ProductVersion examples don't match what's in the log. Product Version: 1.3.0.0.81.159 is not a valid version:
但是,您的ProductVersion示例与日志中的内容不匹配。产品版本:1.3.0.0.81.159不是有效版本:
https://msdn.microsoft.com/en-us/library/aa370859(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/aa370859(v=vs.85).aspx
so you can't rule out the possibility that the invalid versions are related to the error, especially if all the actual MSI versions are 1.3.0.0.
所以你不能排除无效版本与错误相关的可能性,特别是如果所有实际的MSI版本都是1.3.0.0。