cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Anonymous
Not applicable

Run a custom action on Uninstall or uninstall a service during Uninstall

I need to uninstall a Windows service during uninstall. Is there a way to do this?

If not, I need to run a custom action that does it. Can you run a Custom Action during the Uninstall??

Btw, this is for MSI. There are no scripts.

Thanks
Labels (1)
0 Kudos
(3) Replies
Not applicable

First, add a script function to uninstall service by ServiceRemoveService in scripts.

Second, add a Custom Action to call your function by the Custom Action Wizard.

Finally, insert your Custom Action to Sequences -> Installation -> Execute, then set the condition.

Hope this helps you.
0 Kudos
MrTree
Level 6

Or call sc.exe in System32 with Parameter delete "Service Name"
0 Kudos
Bineesh
Level 6

If you are installing the service Add a service in the component there add an event and configure the event as uninstall stop and Uninstall delete "Yes" Rest of the thinsgs as "No"
0 Kudos