This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to set up Recovery in installed Service
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Feb 26, 2013
03:41 AM
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
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
(11) Replies
‎Feb 26, 2013
05:26 AM
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.
‎Mar 11, 2013
09:18 AM
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?
"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?
‎Mar 13, 2013
04:22 AM
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?
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?
‎Mar 15, 2013
08:20 AM
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"?
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"?
‎Mar 15, 2013
08:41 AM
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.
Its up to you whether you ignore the exit code. Personally I always check but that's me.
‎Mar 18, 2013
06:11 AM
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?
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?
‎Mar 18, 2013
08:35 AM
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.
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.
‎Mar 19, 2013
02:22 AM
1. Make sure SC is actually installed in the expected folder.
Yes, sc.exe is installed in C:\WINDOWS\system32 folder in both computers. I tried to call sc.exe as
\sc.exe
\System32\sc.exe
Error 1721. There is a problem with this Windows Installer package.
A programm required for this install to complete could not be run.
Contact your support personnel or package vendor. bla bla
CA is execute as the "Deferred execution in system context"
2. Make sure the syntax is correct for the XP version of SC.
The syntax is correct as I could execute this command in command prompt on XP machine after service is installed.
3. Make sure the service is running before applying the recovery options.
I tried to call this CA almost as the last step, i.e. "After Schedule Reboot" hence I guess that the service is already installed.
3. Can you run the command manually?
Yes
4. Run the CA without hiding the CMD window to see if its throwing an error.
I don't know how to do this. Could you please advise?
Yes, sc.exe is installed in C:\WINDOWS\system32 folder in both computers. I tried to call sc.exe as
Error 1721. There is a problem with this Windows Installer package.
A programm required for this install to complete could not be run.
Contact your support personnel or package vendor. bla bla
CA is execute as the "Deferred execution in system context"
2. Make sure the syntax is correct for the XP version of SC.
The syntax is correct as I could execute this command in command prompt on XP machine after service is installed.
3. Make sure the service is running before applying the recovery options.
I tried to call this CA almost as the last step, i.e. "After Schedule Reboot" hence I guess that the service is already installed.
3. Can you run the command manually?
Yes
4. Run the CA without hiding the CMD window to see if its throwing an error.
I don't know how to do this. Could you please advise?
‎Dec 11, 2019
07:38 AM
Hello,
Can you describe all the steps to create this Custom Action ?
Thank you.