As mentioned above, Windows Installer does not support setting recovery options for services. However, you can use the "sc" command line tool with the "failure" option as a Custom Action.
The Custom Action type will be "EXE with Working Dir" and it can be scheduled under Install. Use the following settings for this Custom Action:
- Execution Properties: "Synchronous execution, ignore return code"
- Execution Options: "Deferred with no impersonation"
- Execution Condition: (Not Installed)
The "Full Path" field will be set, for instance, to:
Code: Select all
"[SystemFolder]sc.exe" failure "service_name" actions=restart/60000/restart/60000/""/60000 reset=86400
Test the command outside the installer before defining the Custom Action.
Hope this helps.