We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

DubiousTrout
Posts: 6
Joined: Wed Apr 08, 2020 12:36 pm

Service Recovery and Failure Operations

Hi,

I'm having difficulty getting the Failure Operations to apply to a service I create with my installer. The service is created and started successfully by the installer, so I assume the details in "Services to install" and "Control Operations" are correct.

Under Failure Operations, I have used the dropdown to populate Service Name (it's the only option available) and Attached Component (same as the service name). Configure On is set to Install only. Failure Actions are set to: #1 Restart the service after 1 minute, #2 Restart the service after 2 minutes, #3 Restart the service after 15 minutes (these are placeholders to test with). Reset failure count is enabled and set to 1 day. Reboot Message and Run Program are not set.

I'm using Advanced Installer Version 16.9 (D24925F7). The service settings are set within a Merge Module, which I'm using with an Enterprise project. My PC is Windows 10 Pro (1909) and my test VM is a domain-member running Windows Server 2019 Standard (1809).

I know I can work round this using SC.exe in a powershell custom action e.g. something like

Code: Select all

sc.exe failure <servicename> reset= 86400 actions= restart/360000/restart/720000/restart/3960000
but I'd like to use Advanced Installer for as much as I can to keep things simple.

Any ideas for how can I troubleshoot this?
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Service Recovery and Failure Operations

Hello,

Just to make sure I fully understand your scenario (so I can further test this on our side):

You have a project to which you add a service (and its operations) through a merge module?

And, when doing so, the "Failure Operations" are not working? If you could give me some more details about what exactly is not working, that would be great. Did you check the "Recovery" tab of your service (services.msc ==> your service ==> double click on it ==> "Recovery" tab) and the failure operations were not added there?

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DubiousTrout
Posts: 6
Joined: Wed Apr 08, 2020 12:36 pm

Re: Service Recovery and Failure Operations

Sorry, only just seen your reply.
Catalin wrote: ↑Fri Apr 10, 2020 9:30 am Did you check the "Recovery" tab of your service (services.msc ==> your service ==> double click on it ==> "Recovery" tab) and the failure operations were not added there?
That is exactly the scenario. In Advanced installer I specify "Restart the service", however looking at the service (services.msc ==> your service ==> double click on it ==> "Recovery" tab) shows "Take no action" for each action.

I've worked around it by using a powershell script.
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Service Recovery and Failure Operations

Hello,

Thank you for your followup on this.

I am really glad you were able to work this around and that everything is working as expected now.

However, I've run few tests just now and everything seemed to be working as expecting on my end:
failureop.png
failureop.png (464.32 KiB) Viewed 5490 times

If possible, could you please create a little sample project that reproduces this issue and forward it to me (for instance, you can take your .AIP file and strip it down from any files - just let its' settings intact)? I would like to further investigate this and, if this ends up as being an issue on our side, I would like to have it fixed for future versions.

P.S.: I already have an executable which I can use as a service.

Looking forward to hearing from you.

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

Return to “Building Installers”