I'm really confused about how the Windows 7 (64bit Ultimate) determines the
Source name of messages in the application event log which originate from a
service I wrote.
My service can be instantiated with a switch or without a switch. This means
that if I register my service twice, once without and once with the switch
/I TEST, I end up with these entires in the registry (there are more of
course but these are the ones relevant to my problem):
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\servic es\APALSvc-POSTERA]
ImagePath="x:\devl\APALSvc\Release_POSTERA\APALSvc-POSTERA.exe"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\servic es\APALSvc-POSTERA-TEST]
ImagePath="x:\devl\APALSvc\Release_POSTERA\APALSvc-POSTERA.exe /I TEST"
(of course, Image path is a hex entry in the registry).
Now both services run fine and write messages to the application event log.
While messages from the switchless service show APALSvc-POSTERA as the
source name, messages from the second service above show TEST as the Source
name instead of APALSvc-POSTERA-TEST.
Why is that and can that be changed?
|