MSI 安装程序在服务启动时启动自动修复 [英] MSI Installer start auto-repair when service starts

查看:44
本文介绍了MSI 安装程序在服务启动时启动自动修复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于 WiX 的 MSI,用于安装服务和一些快捷方式(以及许多其他没有安装的文件).

I have a WiX based MSI that installs a service and some shortcuts (and lots of other files that don't).

快捷方式是按照 WiX 文档 中的描述创建的,并带有注册表HKCU 下的密钥作为密钥文件.这是所有用户安装,但要通过 ICE38,此注册表项必须在当前用户下.

The shortcut is created as described in the WiX docs with a registry key under HKCU as the key file. This is an all users install, but to get past ICE38, this registry key has to be under the current user.

当服务启动(它在 SYSTEM 帐户下运行)时,它注意到该注册表项无效(至少对该用户无效)并再次运行安装以修复".

When the service starts (it runs under the SYSTEM account) it notices that that registry key isn't valid (at least of that user) and runs the install again to "repair".

在事件日志中,我收到 MsiInstaller 事件 1001 和 1004,显示资源‘HKEY_CURRENT_USER\SOFTWARE\MyInstaller\Foo’不存在."这并不奇怪,因为 SYSTEM 用户没有这个密钥.

In the Event Log I get MsiInstaller Events 1001 and 1004 showing that "The resource 'HKEY_CURRENT_USER\SOFTWARE\MyInstaller\Foo' does not exist." This isn't surprising since the SYSTEM user wouldn't have this key.

我打开了系统范围的 MSI 日志记录,并且自动修复在 C:\Windows\Temp 文件夹中创建了它的日志文件,而不是特定用户的 TEMP 文件夹,这似乎暗示当前用户是 SYSTEM(加上日志文件显示调用过程"成为我的服务).

I turned on system wide MSI logging and the auto-repair created its log file in the C:\Windows\Temp folder rather than a specific user's TEMP folder which seems to imply the current user was SYSTEM (plus the log file shows the "Calling process" to be my service).

我可以做些什么来禁用自动修复功能?我是做错了什么还是违反了 MSI 规则?关于下一步去哪里的任何提示?

Is there something I can do to disable the auto-repair functionality? Am I doing something wrong or breaking some MSI rule? Any hints on where to look next?

推荐答案

将组件拆分为单独的功能.通过将服务放入它自己的功能中,它不会对其他组件进行扫描.

Split the components out into seperate features. By putting the service in it's own feature it won't do a scan for the other components.

这篇关于MSI 安装程序在服务启动时启动自动修复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆