cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

How to set up Recovery in installed Service

Hello,

I have InstallShiel2012 Basic MSI project which installs service on the target PC. I would like to set Recovery options to "Restart the Service" for first, second and subsequent failures for this service.
Could you please advise how I can configure this in InstallShield project?

Thank you in advance.

Best regards, Georgiy
Labels (1)
Tags (2)
0 Kudos
10 Replies
Flexera Janardhan_R
Flexera

Re: How to set up Recovery in installed Service

The service which is being installed will be part of any component. Go to components view(|Advanced Settings|Services) in the InstallShield project. Select the service in question, under configure settings in the right side you can see Recovery Actions.
0 Kudos

Re: How to set up Recovery in installed Service

Thank you for response! I found such Recovery actions for the service, but I didn't manage to find proper settings that service would have following options
"Restart the Service" for first failure,
"Restart the Service" for the second
"Restart the Service" for the subsequent failures

Could you please advise how to set such options?
0 Kudos
Not applicable

Re: How to set up Recovery in installed Service

To do this I create a CA and then invoke SC.EXE to set the restart parameters. Run the CA after MsiConfigureServices.
0 Kudos

Re: How to set up Recovery in installed Service

Thank you for your advise. I found microsoft support page regarding sc.exe
http://support.microsoft.com/kb/251192

but do you know whether it's possible to set up such recovery action only in InstallShield Configure settings -> Recovery settings?
0 Kudos
Not applicable

Re: How to set up Recovery in installed Service

No I don't think you can.
0 Kudos

Re: How to set up Recovery in installed Service

Thank you! I did it as you advised, i.e. made a custom action to call
\sc.exe failure service_name reset= 30 actions= restart/60000

and execute it after MsiConfigureServices
Return Processing: Synchronous (check exit code)

Installation went fine, but got error 1722 on uninstall.
Then i changed Return Processing to Synchronous (ignore exit code) and uninstall went fine.

Could you please tell whether it's OK to have "ignore exit code" return processing? or should I have "check exit code"?
0 Kudos
Not applicable

Re: How to set up Recovery in installed Service

I have mine in the Exec sequence - make sure the 'Install Exec Condition' is set to "Not Installed" so the CA doesn't get run during uninstall.

Its up to you whether you ignore the exit code. Personally I always check but that's me.
0 Kudos

Re: How to set up Recovery in installed Service

Thanks, adding "Not Installed" exec conditions helped, and I don not have any errors during uninstall when i use "synchronous (check exit code)"

Now serice configuration works fine on Win7, but does not work on winXP.
I manually executed the same sc command on XP machine and service recovery settings were changed.

sc failure service_name reset= 30 actions= restart/60000

Could you please tell what might be wring with WinXP?
0 Kudos
Not applicable

Re: How to set up Recovery in installed Service

I haven't played with XP for sometime, but a few things to check if you haven't already:

1. Make sure SC is actually installed in the expected folder.
2. Make sure the syntax is correct for the XP version of SC.
3. Make sure the service is running before applying the recovery options.
3. Can you run the command manually ?
4. Run the CA without hiding the CMD window to see if its throwing an error.
0 Kudos