The Services page has an Error Control dropdown with the 3 options:
- Ignore the error
Display an error message and continue
Display an error message and restart the computer
So to work around this, I'm setting the error control to "Ignore the error".
BUG REPORT 2: "Ignore the error" only works if I don't have "Wait until the service completes" ticked in the Control Operations part of the service setup.
So, I have "Ignore the error" set and "wait until the service completes" UNticked: The installer now correctly ignores the service start failure. But then I want to detect whether the service started or not using the built-in custom-action "Detect a service". I put this as a sequenced custom-action just after the InstallFinalize, thinking I could then have a Message Box custom action just after it in sequence to warn the user, if AI_SERVICE_STATE <> "Started". The problem is, AI_SERVICE_STATE equals "Started" at that point. I'm thinking I must be doing something very wrong here. The documentation mentions that the Detect a Service custom-action can be put anywhere in the sequence, which implies it could be being called at any point, though the service is never "started" (it may be "starting", at some point before it fails, but never "started". Does the Detect a Service custom action not work on services the installer itself has just installed perhaps?...
What am I doing wrong? Is there a better way?