Service "Failure Operations" not working - Advanced Installer Community
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Service "Failure Operations" not working

I have just tried to create a Service with the "Services" and encountered THREE problems (bugs):

1. When creating a Service that the executable has spaces inside: then the Service would NOT start. Creating with no spaces worked!
So I first had an executable: "Observer Streamer.exe". The Service itself was created in the Services.msc, but although selected by AdvancedInstaller to start ("Event On Install": "Start"): it did NOT. Changing the file name to "ObserverStreamer.exe" fixed the problem. The Service was installed and started as expected. So this clearly looks like a bug, because I can create a Service name with a space when using the command prompt "sc.exe" command.
2. When I add "Failure Operations" for a Service, you have the "Failure Actions". There you can choose to restart the service or restart the computer and so on. These options should later be seen when you open Services.msc, choose your Service, and choose the "Recovery" tab. So I added three actions: all to restart the Service after 60000 (60 seconds - which was the default). After installing the MSI which created the Service successfully, I go to the "recovery" tab for this new Service I created with AdvancedInstaller, but I do NOT see anything in the recovery. Meaning: it still says:
First failure: Take no action
Second failure: Take no action
Subsequent failure: Take no action
Then since my Service was set to run, I use TaskManager to kill it. After 60 seconds it should restart the Service - as I selected in AdvancedInstaller (in "Failure Actions"). But this doesn't work.
I then manually added:
First failure: "restart the service" in the "recovery" tab of the Service in Service.msc, and tested again by killing the Service: and the Service is restarted after 60 seconds -> as expected.
So this means that AdvancedInstaller options for "Failure Actions" do not work, and do not appear in the Services.msc "Recovery" tab either.

3. I tried in the same area: "Failure Operatoins Parameters" to "Run Program". So I added in "Program:" I added: "Notepad.exe". I built the MSI, but when killing my Service: notepad.exe did NOT appear. Moreover, when I reopened AdvancedInstaller: "Notepad.exe" changed places!!!! from "Program:" to "Arguments:" !!!!!!

I consider these serious bugs, since we have purchased AdvancedInstaller for creating EASY installations, and NOT playing with Custom Actions to create Services and other things found not working.
Waiting for your reply on this.
Thanks, Dashut.
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: Service "Failure Operations" not working

FYI: After "playing" I have managed to create a Service name that HAS space! So problem #1 is resolved (managed to create Service name: "Observer Streamer" unlike "ObserverStreamer" which we didn't want).
Still pending: #2 ("Failure Operations") and #3 ("Failure Operatoins Parameters") (read in the first post).

Dashut.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Service "Failure Operations" not working

Hi Dashut,

Regarding Failure operations, they are only supported by Windows Installer 5.0 (Windows 7). This is specified in our help for the Services Page.

Regarding 3), thank you for bringing it to our attention, I can confirm this is a bug. I have added a fix on our TODO list which will be available in a future version of Advanced Installer.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: Service "Failure Operations" not working

Okay, so if "Failure Operations" is only for Windows Installer 5.0 (Windows 7): then how do I modify these values?
I want to have in the Services.msc for my Service in the "Recovery" tab:
First failure: Restart the Service
Second failure: Restart the Service
Subsequent failure: Restart the Service
with 0 days, and 1 minute.

How to do that using AdvancedInstaller? (I don't want to create a custom action, because then I can do all this by myself, but I want AdvancedInstaller to do it for me).
Dashut.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Service "Failure Operations" not working

Hi Dashut,

I'm afraid that for older Windows Installer versions failure operations can be configured only through custom actions.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: Service "Failure Operations" not working

Just for anyone who's interested, here's how I solved the problem:
I added a custom action in "InstallExecuteSequence" under "install" with "New Custom Action"->"EXE with Working Dir"
in the "Full Path:" I put:

Code: Select all

sc.exe failure "Observer Streamer" reset= 240 actions= restart/60000/restart/60000/restart/600000
Where "Observer Streamer" is the name of my Service.
Now if you go to the Services.msc to the Service and go to the "Recovery" tab, then you'll see "Restart this Service" for all three entries.

Hope this helps for anyone interested.
Dashut.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Service "Failure Operations" not working

Hi Dashut,

Thanks for posting your solution, I'm sure others will find it useful.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Service "Failure Operations" not working

Hi Dashut,
3. I tried in the same area: "Failure Operatoins Parameters" to "Run Program". So I added in "Program:" I added: "Notepad.exe". I built the MSI, but when killing my Service: notepad.exe did NOT appear. Moreover, when I reopened AdvancedInstaller: "Notepad.exe" changed places!!!! from "Program:" to "Arguments:" !!!!!!
This was fixed in version 11.3 of Advanced Installer released on June 17th, 2014.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
schwarzsurfer
Posts: 49
Joined: Wed Feb 10, 2016 11:06 am

Re: Service "Failure Operations" not working

Hello,

I have a similar problem with the installer crashing during setup. When I use the function of Advanced Installer to set the Windows failure operations the process MSIEXEC crashes during the setup. The service gets installed and the failure operations are set, but it still crashes. I added some screenshots... do you have any idea why this happens? It's a Windows Server 2012.

Thank you!
Marian
Attachments
installer.JPG
installer.JPG (71.42 KiB) Viewed 10502 times
failure_operations.JPG
failure_operations.JPG (43.11 KiB) Viewed 10502 times
appcrash.JPG
appcrash.JPG (51.02 KiB) Viewed 10502 times
Ich weiß, dass ich nichts weiß!
schwarzsurfer
Posts: 49
Joined: Wed Feb 10, 2016 11:06 am

Re: Service "Failure Operations" not working

Oops, wrong thread. I wanted to reply to this thread: http://www.advancedinstaller.com/forums ... hp?t=30010
Ich weiß, dass ich nichts weiß!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Service "Failure Operations" not working

Hello Marian,

We has a similar issue in our past versions of Advanced Installer. A fix for this issue was included starting with our 12.3 version of Advanced Installer. So, do you replicate the installation crash using a version of AI equal with or higher than 12.3? If so, can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
schwarzsurfer
Posts: 49
Joined: Wed Feb 10, 2016 11:06 am

Re: Service "Failure Operations" not working

Hi Daniel,

at the moment I use AI 12.6.1... I will send the files to you. Thank you!

Marian
Ich weiß, dass ich nichts weiß!

Return to “Common Problems”