Service recovery with Util:ServiceConfig

Windows allows you to set actions to be taken if your service fails at some point while it's running. Note that at this point, we're handling errors that crash the service during its lifetime and not errors during the installation. Your three options are: try to restart the service, run an executable file or script, or reboot the machine. You can see these settings in the services management console by viewing Properties of your service and clicking on the Recovery tab.

Service recovery with Util:ServiceConfig

First, let's alter the original Windows service that we created by changing the WriteToLog function so that it throws an error the third time ...

Get WiX 3.6: A Developer's Guide to Windows Installer XML now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.