[wix-users] RestartResource is not stopping the application

Wheeler, Blaine (DSHS/DCS) BWheeler at dshs.wa.gov
Wed Sep 14 10:51:09 PDT 2016


We have an applicaton installed per-machine, Invoked by the logged in user that runs in the system tray.  It appears to be registering itself with the RestartManager when it starts up.

On upgrade I want the installer to stop the app, apply the update and then restart it.  The app does not get closed by RestartManager although it from the installer log it looks the RestartManager tries.  When I watch the exe in the Task Manager I do not see it stopping.

Am I missing a property or should I try scheduling the step differently?

This is the only line I have inserted in the wxs
<util:RestartResource Path="[INSTALLDIR]" ProcessName="$(var.exeName)" />


The log shows thrse steps when RestartResources kicks off
**********************************
Action ended 10:23:22: MigrateFeatureStates. Return value 0.
MSI (s) (5C:E8) [10:23:22:507]: Doing action: WixRegisterRestartResources
MSI (s) (5C:E8) [10:23:22:507]: Note: 1: 2205 2:  3: ActionText
Action start 10:23:22: WixRegisterRestartResources.
MSI (s) (5C:DC) [10:23:22:538]: Invoking remote custom action. DLL: C:\windows\Installer\MSI71D1.tmp, Entrypoint: WixRegisterRestartResources
MSI (s) (5C:E0) [10:23:22:538]: Generating random cookie.
MSI (s) (5C:E0) [10:23:22:538]: Created Custom Action Server with PID 7396 (0x1CE4).
MSI (s) (5C:3C) [10:23:22:585]: Running as a service.
MSI (s) (5C:3C) [10:23:22:585]: Hello, I'm your 32bit Impersonated custom action server.
MSI (s) (5C!FC) [10:23:22:600]: Note: 1: 2711 2:
Action ended 10:23:22: WixRegisterRestartResources. Return value 1.
MSI (s) (5C:E8) [10:23:22:616]: Doing action: InstallValidate
MSI (s) (5C:E8) [10:23:22:616]: Note: 1: 2205 2:  3: ActionText
Action start 10:23:22: InstallValidate.
MSI (s) (5C:E8) [10:23:22:616]: PROPERTY CHANGE: Deleting MsiRestartManagerSessionKey property. Its current value is '3181084aad430e4aa5c055bcc4dd5c38'.
MSI (s) (5C:E8) [10:23:22:616]: Note: 1: 2205 2:  3: Dialog
*****************************

Then at the end of InstallValidate this appears
MSI (c) (F0:80) [10:23:22:647]: RESTART MANAGER: Session opened.
MSI (c) (F0:80) [10:23:22:663]: Font created.  Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

MSI (s) (5C:E8) [10:23:28:039]: Note: 1: 2205 2:  3: ActionText
MSI (s) (5C:E8) [10:23:28:054]: RESTART MANAGER: Successfully shut down all applications in the service's session that held files in use.
MSI (c) (F0:80) [10:23:28:054]: RESTART MANAGER: Successfully shut down all applications that held files in use.
MSI (s) (5C:E8) [10:23:58:058]: RESTART MANAGER: Failed to shutdown all applications. Might result in a reboot.
MSI (s) (5C:E8) [10:23:58:073]: Note: 1: 2727 2:
************************

and further down in InstallValidate is this entry
MSI (c) (F0:80) [10:23:58:323]: RESTART MANAGER: Failed to add process ID 6484 resource; Windows Installer will use the built-in FilesInUse functionality. Error: 22


More information about the wix-users mailing list