I am looking for advice on how to handle a failure when I use util:RestartResource. In most situations this implementation works fine, but I have one peculiar failure mode. The application is a c++ windows tray application, which originally did not have any windows or message pump. The developer added a hidden window and message processing so that we could use the Restart Manager, which generally works. However this app, and the msi package that I deploy it in is used in several products. So there are several applications (within a bundle chain) and also in separate bundles (products) which may start this tray application.
One might observe several instances of this tray application running under different users in the Task Manager Details screen (even though it is only installed to one location using this one msi package). The following line causes the multiple instances to terminate (or whatever is needed) and the repair succeeds, in most situations. <util:RestartResource ProcessName="$(var.PrimaryFileName)"/> I also have a bundle which installs a service in the LOCALSERVICE account. That bundle includes this msi for this tray app (and the above code) which also works fine when the tray app is launched in the context of LOCALSERVICE, and the bundle is run in Repair. However where the problem occurs is when the service has launched the tray app in the context of LOCALSERVICE and a different bundle, which also includes the above msi is run in repair the following error is reported, but only if there is an instance of the tray app running under LOCALSERVICE. If there are multiple instances under other users, and no instance under LOCALSERVICE, there is no error observed. WixRegisterRestartResources: Error 0x80070005 Failed to register the process name with the Restart Manager session. The bundle then fails and does a rollback. So it looks like src\libs\dutil\rmutil.cpp RmuAddProcessesByName is failing only in this one scenario, but when the same code is executed in another bundle, and the tray app is also running in the LOCALSERVICE context it does not fail. I am still trying to understand this (and looking for a change I can make or advise the dev of the tray app to make). Any suggestions would be appreciated. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/RestartManager-Failed-to-register-the-process-name-tp7597824.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users