MSI安装程序远程失败 - 即使卸载后,也已安装“更新版本”

问题描述 投票:3回答:4

我开始使用我们的自动构建,这是一种奇怪的行为。我有一个非常简单的Windows服务.msi(内置在Visual Studio 2010中),它在我们的中央构建/ repo服务器上编译,上传到我们的开发服务器,然后从构建/ repo服务器远程安装(命令行)在开发服务器上通过ssh使用plink)。

这工作很长一段时间,直到最近自动化构建开始100%失败。 msi的详细安装日志表明“已安装此产品的较新版本”。我远程进入开发服务器,检查了msi,并且在服务器上自己手动安装它没有问题(通过命令行和GUI)。然后,我从“程序和功能”窗口中卸载了该服务,验证了文件和条目已被删除,再次尝试从构建服务器远程安装它,并再次得到完全相同的错误。该服务不会远程安装,因为它认为仍然安装了较新的服务(即使我已经卸载它),但我可以自己手动完成。

编辑

添加一些日志文本。

Action start 15:47:16: AppSearch.
MSI (s) (B8:F0) [15:47:16:265]: Doing action: FindRelatedProducts
Action ended 15:47:16: AppSearch. Return value 1.
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
Action start 15:47:16: FindRelatedProducts.
MSI (s) (B8:F0) [15:47:16:267]: PROPERTY CHANGE: Adding NEWERPRODUCTFOUND property. Its value is '{4E9314AB-F84B-4628-BAFF-19A8B785A3B0}'.
MSI (s) (B8:F0) [15:47:16:268]: Doing action: ERRCA_CANCELNEWERVERSION
Action ended 15:47:16: FindRelatedProducts. Return value 1.
MSI (s) (B8:F0) [15:47:16:269]: Note: 1: 2235 2:  3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'ERRCA_CANCELNEWERVERSION' 
Action start 15:47:16: ERRCA_CANCELNEWERVERSION.
MSI (s) (B8:F0) [15:47:16:269]: Product: Product.Services -- Unable to install because a newer version of this product is already installed.

Unable to install because a newer version of this product is already installed.
Action ended 15:47:16: ERRCA_CANCELNEWERVERSION. Return value 3.
Action ended 15:47:16: INSTALL. Return value 3.
windows service installer windows-installer
4个回答
4
投票

MSI(s8)(B8:F0)[15:47:16:267]:物业变更:添加NEWERPRODUCTFOUND属性。其值为“{4E9314AB-F84B-4628-BAFF-19A8B785A3B0}”。

听起来在某个地方有一个旧版本的安装,即使它可能不会显示在程序和功能中。我会尝试以下方法来查看它是否解决了您的问题:

  1. 尝试通过命令行qazxsw poi卸载
  2. 在注册表中搜索产品代码msiexec /x {4E9314AB-F84B-4628-BAFF-19A8B785A3B0},以查看是否存在先前安装的残余。如果您找到该产品代码,您可以尝试手动删除这些条目(由您自己承担风险)以查看是否能解决您的问题。

7
投票

我收到了与@Tom相同的错误:“ - 已经安装了更新的版本”

我能够通过以下步骤进行修复:1。运行MSI并启用详细日志记录

{4E9314AB-F84B-4628-BAFF-19A8B785A3B0}

2.打开从上面的命令生成的日志文件,并复制该行中显示的GUID

msiexec /i "{Path to msi}.msi" /L*V "c:\myLog.log"
  1. 使用复制的GUID,运行以下命令 msiExec / x {FB0B54D2-9C47-4196-BF0E-B6EEBF754E22}
  2. 此时,旧服务已卸载,然后我继续使用MSI安装服务,没有任何问题。希望这可以帮助。

1
投票

另一个对我有用的解决方案是:

  1. 在VS解决方案中选择您的安装项目,然后按F4以显示属性窗口
  2. 单击此值右侧的按钮更改ProductCode和UpgradeCode的GUID。将出现一个新的模态窗口,您只需按下“新代码”按钮

请记住,以前的安装将保留在Windows注册表中,您应该将其卸载。这仅用于因错误而导致不同VS设置具有相同GUID(例如使用设置模板)


1
投票

如果在解决方案资源管理器中选择安装文件并按F4,您将获得安装文件的属性。将属性“DetectNewerVersion”设置为false并重新安装

最好的运气

© www.soinside.com 2019 - 2024. All rights reserved.