Click here to Skip to main content
15,897,032 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello everyone! I have a little question.

Everyone knows that field "Source" in EventLog Viewer, when you view logs, indicates the name of source. As far as I know the name of source is taken from eventlog entry. But at that time the source name is the name of registry key under the appropriate eventlog key.
For example, if we have custom eventlog "TestLog" it's key is
HKLM\\SYSTEM\\CurrentControlSet\\services\\eventlog\\TestLog
and a custom provider "TestProvider" that writes events to that log with key
HKLM\\SYSTEM\\CurrentControlSet\\services\\eventlog\\TestLog\\TestProvider
.
So, if TestProvider will write event in TestLog, the "Source" field in EventViewer will be "TestLog". And at last here is my question "If we take a look, for example, at
HKLM\\SYSTEM\\CurrentControlSet\\services\\eventlog\\Application\\Microsoft-Windows-RestartManager
provider and write some events to Application log we will see that "Source" field in EventViewer isn't "Microsoft-Windows-RestartManager" but "RestartManager". How can it be? That source name in eventlog is different from source name in registry?
Posted
Comments
NuttingCDEF 29-Apr-11 17:44pm    
I don't claim to know all the ins and outs of this, but if I look at the application log on my XP PC, there are entries with sources such as "gusvc" and "gupdate1c9a86db35d22a4" - but these don't exist as keys in HKLM\\SYSTEM\\CurrentControlSet\\services\\eventlog\\Application - though they do exist as keys in HKLM\\SYSTEM\\CurrentControlSet\\services, i.e. outside the eventlog key. Keys for sources like MSSQL$EXPRESS exist in both these locations. Others such as "SecurityCenter" exist only in "HKLM\\SYSTEM\\CurrentControlSet\\services\\eventlog\\Application".

Not sure how much this helps, but identifying the source with a registry key evidently isn't quite straightforward.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900