Loading
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

  • 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.
    Expand Post
  • Or call sc.exe in System32 with Parameter delete "Service Name"
  • 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"

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