nghobrial
Posts: 10
Joined: Thu Mar 14, 2019 3:05 pm

Failure Operations not working

Mon Mar 02, 2020 10:41 pm

I am attempting to create Failure Operations for my services. This is when installing on Windows Server 2016 using an exe created by Advanced Installer 16.8.

I simply am left with the defaults of "Take No Action", despite attempting to change the failure actions to "Restart the service". Also, changing the "Reset failure count after X days" does not take effect either.

Has anyone else experienced this? Are there any workarounds that don't involve creating a custom action to install the services manually?

nghobrial
Posts: 10
Joined: Thu Mar 14, 2019 3:05 pm

Re: Failure Operations not working

Tue Mar 03, 2020 3:52 pm

After comparing with an installer that was working properly, I discovered that somehow certain rows were removed for things like AI_ConfigFailActions and AI_ProcessFailActions. I could not find in the UI where these actions were removed, nor do I know how it happened. After manually adding them back, though, it worked.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Failure Operations not working

Tue Mar 03, 2020 4:10 pm

Hi,

I am glad you got this solved.

Also, if you are able to isolate this behavior into a sample project or you have any pattern or test project that you can share with us to further investigate on this, this will be useful for us.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

mustafa.gaziani
Posts: 1
Joined: Mon Nov 20, 2023 3:08 pm

Re: Failure Operations not working

Mon Nov 20, 2023 3:35 pm

Hello,

I'm facing the same issue on Advance Installer 19, the Failure Operation is not working for me as well. Neither it's working on Windows 10 nor on any Windows Server.

When the service is installed successfully, I left with the default "Take No Action", despite attempting to change the failure actions to "Restart the service". Also, changing the "Reset failure count after X days" does not take effect either.


I'm also trying to make it work using the custom Actions (Launch File OR Launch EXE with working directory) but it is also not working.

Launch File Settings
File to Launch: [%ComSpec]
CommandLine: sc.exe failure "Service.exe" actions=restart/60000/restart/60000/restart/60000 reset=86400
Working Directory: Empty
Run As Admin: True
Execution Time: When the system is being modified (deferred)
Execution Options: Wait for custom action to finish
Execution Stage: Install
Condition: Not Installed

Launch EXE with working directory
File Path: [%ComSpec]
Command Line: sc.exe failure "Service.exe" actions=restart/60000/restart/60000/restart/60000 reset=86400
Working Directory: APPDIR
Execution Time: When the system is being modified (deferred)
Execution Options: Wait for custom action to finish
Execution Stage: Install
Condition: Not Installed


Install Parameter / Installation Options
Installation Type: Per-machine if a user is administrator, per-user otherwise
Run as Administrator: True

I don't know why the service recovery is not updating, though the service is installed successfully

Any help with this would be highly appreciated.

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

Re: Failure Operations not working

Wed Nov 22, 2023 11:24 am

Hello and welcome to our forums,

I've run some tests and the failure operations were succesfully created on my machine.
Screenshot_83.png
Screenshot_83.png (103.29KiB)Viewed 4209 times
If possible, please create a sample project that reproduces this and forward it to me together with the setup package by email at support at advancedinstaller dot com so I can further test this.

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

Return to “Common Problems”