When writing messages via logMessage, then the Windows Event Viewer usually displays:
The description for Event ID ( 0 ) in Source (...) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: [actual message]
To avoid that, and to only have the message itself displayed, the following steps have to be taken:
a) Create a dummy.mc file like this:
b) Compile that dummy.mc file into a resource file:
c) Add the resource file to your project:
RC_FILE = dummy.rc
d) Register the service executable as the message source by adding a registry key:
That entry needs to point to the executable.
Steps a/b/c could be handled by the service.pri file. Step d could be performed by the service's self-installing routine.