我有一个带有 WIX 的 MSI 版本。包有InstallScope="perMachine"
属性。
我的产品依赖于某些版本的一些 3rd 方产品。MSI 使用Upgrade
元素检查先决条件。
我想通过 AD/GPO 部署我的 MSI。计算机配置下的部署成功,但我想在用户配置下发布(未分配)部署。在这种情况下,用户可以在“程序和功能 - 从网络安装程序”中看到我的安装,并且可以选择:安装或不安装我的产品。
但发布的部署失败。MSI日志有一部分:
MSI (c) (38:CC) [16:22:32:906]: Product {D4_____________F9} is admin assigned: LocalSystem owns the publish key.
MSI (c) (38:CC) [16:22:32:906]: Product {D4_____________F9} is managed.
MSI (c) (38:CC) [16:22:32:906]: Running product '{D4____________F9}' with elevated privileges: Product is assigned.
MSI (c) (38:CC) [16:22:32:906]: Product not registered: beginning first-time install
MSI (c) (38:CC) [16:22:32:906]: Determined that existing product (either this product or the product being upgraded with a patch) is installed per-user.
MSI (c) (38:CC) [16:22:32:906]: PROPERTY CHANGE: Deleting ALLUSERS property. Its current value is '1'.
...跳过...
Action begin 16:22:32: FindRelatedProducts.
MSI (c) (38:CC) [16:22:32:922]: FindRelatedProducts: current install is per-user. Related install for product '{69_______________BD}' is per-machine. Skipping...
MSI (c) (38:CC) [16:22:32:922]: FindRelatedProducts: current install is per-user. Related install for product '{69_______________BD}' is per-machine. Skipping...
MSI (c) (38:CC) [16:22:32:922]: FindRelatedProducts: current install is per-user. Related install for product '{DD______________23}' is per-machine. Skipping...
Action end 16:22:32: FindRelatedProducts. Return value 1.
然后 MSI 失败,因为未找到先决条件。
所以我的问题是:为什么安装上下文切换到每个用户?如何预防?也许有一种方法可以抑制在每个用户上下文中跳过 FindRelatedProducts?