Mel
Posts: 45
Joined: Fri Jul 10, 2020 10:59 am

why does my windows service not uninstall using custom actions ?

I have a windows service that is installed independently of the installer , so i have a custom action to uninstall when the app is uninstalled. The executable process is stopped and deleted , but the service under services.msc is still there and not deleted.
I have tested the custom action steps in a console app on its own and it works .

I have also followed the steps outlined in the documentation.
What else can i look at ?


thanks
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: why does my windows service not uninstall using custom actions ?

Hello,

Please note that in order to stop and delete service, you must provide administrator privileges.

With that bein said, please make sure that the custom action that deletes your service is run with administrator privileges, otherwise it will not be able to stop and delete the service.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Mel
Posts: 45
Joined: Fri Jul 10, 2020 10:59 am

Re: why does my windows service not uninstall using custom actions ?

Is the admin priviledge set under the Custom Action in Advanced Installer ?

Thanks
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: why does my windows service not uninstall using custom actions ?

Hello,
Is the admin priviledge set under the Custom Action in Advanced Installer ?
It depends on the custom action. For instance, if the "Launch File" custom action is used, then the answer is yes.

LF.png
LF.png (98.87 KiB) Viewed 1976 times


Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”