I am creating an MSI package for installing and starting Windows services using WiX v3.8. The code as follows:
The error message you are getting is the generic message the Windows Installer sends when it fails to start a service during install. Almost always the issue is that the Service is missing a dependency or otherwise not fully configured when the start occurs. To debug the root issue try:
If this is a service written in managed code, ensure that it does not depend on files being placed in the GAC. Files are not in the GAC until very, very late during the installation process. If you must use files in the GAC, you will not be able to use the built-in ServiceControl
element and will have to write a custom action to run after InstallFinalize
. Note that after InstallFinalize
a custom action will not be elevated so your service will have to support being started by non-elevated users. Again, I recommend not depending on the GAC.
Good luck debugging your service!