I have created an installer and I put out the update every now and then. FYI, my program has two parts: service application and dll. Some of other client applications use my dll and my service application runs constantly.
Because some of client applications use my dll, if I run the update, restart manager restart those client apps but I would like to make sure that they do not restart so I disabled restart manager by setting MSIRESTARTMANAGERCONTROL to be ‘Disable’ in my wix script.
So this prevents other client apps from restarting and that is great. But the side effect of it is that my service application does not restart either after the update procedure.
So basically my question is that I would like to find a way to prevent other client apps from restarting but I want to make sure that my service does restart after the update.
What would you recommend? Any advice will be appreciated.
You need to postprocess the MSI package emitted by your setup build. You will need to add entries to the ServiceControl table so that Windows Installer will stop the service when your component is installed and then start it up again after the new DLL is installed. You’ll also need to ensure that the StopServices and StartService actions are scheduled in the InstallExecuteSequence table.
You’ll need to use the wirunsql.vbs tool to run the relevant INSERT queries to add the necessary records.