开发者

MSI Installer start auto-repair when service starts

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

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.

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".

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 t开发者_C百科he SYSTEM user wouldn't have this key.

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).

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.


If you use an advertised shortcut you don't need the HKCU registry entry.


To avoid the auto-repair you are seeing but still have the same effect, you could use ActiveSetup, which is a dead simple system that ensures each user has a program--usually a configuration program or script that configures the HKCU Registry settings--run exactly once.

(The first article linked above, something I wrote several years ago, compares the different methods, and if you didn't guess already, favors ActiveSetup...)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜