MGS
Posts: 110
Joined: Tue Oct 04, 2022 9:52 am

Starting and stopping services during install and uninstall

Hi,

we have 2 questions regarding services.
  • 1. If I need to start a service during install is there a way to tell the installer to continue the installation? On our current installer there is only an option to cancel the whole installation.
    2. If I need to (force) stop a service without any confirmation can I do this with the Services -> Control Operations? If not is there a way in the installer to do this?
Best regards,
Kilian
Catalin
Posts: 6732
Joined: Wed Jun 13, 2018 7:49 am

Re: Starting and stopping services during install and uninstall

Hello Kilian,
1. If I need to start a service during install is there a way to tell the installer to continue the installation? On our current installer there is only an option to cancel the whole installation.
By using the predefined support (Control Operations), I'm afraid that this might not be possible.

However, if you start the service through a custom action, you can uncheck the "Fail installation if custom action returns error" and that should give you the desired result.
Screenshot_149.png
Screenshot_149.png (51.12 KiB) Viewed 1381 times
2. If I need to (force) stop a service without any confirmation can I do this with the Services -> Control Operations? If not is there a way in the installer to do this?
Yes, this should stop the service silently.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MGS
Posts: 110
Joined: Tue Oct 04, 2022 9:52 am

Re: Starting and stopping services during install and uninstall

Hi,

Where can I find the "StopService" action? I only can add "StopServices" and I can't edit anything there.
Capture.PNG
Capture.PNG (184.06 KiB) Viewed 1371 times

It also doesn't stop the services silently. Is there a hidden option to make it silent?
2024-05-10 11_58_37-mgsbldsrv02 - Remote Desktop Connection.png
2024-05-10 11_58_37-mgsbldsrv02 - Remote Desktop Connection.png (69.18 KiB) Viewed 1045 times

Best regards,
Kilian
Last edited by MGS on Fri May 10, 2024 11:09 am, edited 1 time in total.
Liviu
Posts: 1081
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Starting and stopping services during install and uninstall

Hello Kilian,

Sorry for the delayed reply on this.

You can find the Stop service custom action in the predefined list:
stop service.png
stop service.png (159.75 KiB) Viewed 1344 times

Hope this helps!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MGS
Posts: 110
Joined: Tue Oct 04, 2022 9:52 am

Re: Starting and stopping services during install and uninstall

Stopping the service with a condition does not work during uninstall. If I set the condition to 1 it is executed.
I need the StopService action only if my service is being installed/reinstalled/upgraded/uninstalled.
Capture1.PNG
Capture1.PNG (10.07 KiB) Viewed 958 times
Conditions i tried so far that are not working:
  • ((&LIMS_Service_x64 = 2) AND (!LIMS_Service_x64 = 3)) //Feature is being unintalled
  • (&LIMS_Service_x64 = 5) //Feautre is being reinstalled
  • (&LIMS_Service_x64 = 2) // Feature action absend
  • (&LIMS_Service_x64 = 3) // Feature action install locally
  • (&LIMS_Service_x64 = 4) // Feature action installed, run from source

The dialog that the application needs to be closed still pops up with any/all of these conditions.

What do I need in the condition field to execute it only if the feature is involved ?



-----------------------------------------------------

The StartService custom action is also never executed. Not even if the condition is set to "1". When i check the services after installation of my program the service that was installed is not running.

Best regards,
Kilian
Liviu
Posts: 1081
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Starting and stopping services during install and uninstall

Hello Kilian,

Can you please send us the .AIP (setup project) file and an installation log by email to support at advancedinstaller dot com so we can further test and investigate this?

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”