cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gridman
Level 8

Starting and Stopping a Service in Basic MSI

I have a Basic MSI installation where in a Minor Upgrade, I need to stop a service, change a registry entry, and restart the service.

My plan was to call ServiceStopService and ServiceStartService in an InstallScript custom action. However, I am not clear whether this should be a Deferred custom action or not.
Labels (1)
0 Kudos
2 Replies
Ajay_Ladsaria
Level 7

Any custom action that makes a system change should be of type "Deferred execution in system context." Only these types of custom actions are run with elevated privileges.

I am not sure whether elevated privileges are required for starting and stopping services, but I suspect that they may be. Also, if you are planning on making the registry change in your custom action as well, then this definitely would be considered a system change.

Hope this helps,
Ajay
0 Kudos
gridman
Level 8

Thank you for the help.
0 Kudos