Retrieving event logs for non-english Windows editions

  • Thread starter Thread starter Dev10110110
  • Start date Start date
D

Dev10110110

Guest
Retrieving event logs is relatively easy. The following is C#, but please pretend it is C++. You can see what it's doing anyway:

EventRecord Event = new EventLogReader
( new EventLogQuery
( "Microsoft-Windows-Time-Service/Operational",
PathType.LogName,
"*"
)
).ReadEvent();

What this does is returning the log entries in "Applications and Services Logs" / Microsoft / Windows / Time-Service / Operational. This works fine in English version of updated Windows 10. I am getting very strong indications that this does not work for non-English Windows, although I am not completely sure. The reason, I guess, is that the event log's path labelling would be in local language. Therefore, the string in the code would be invalid.

Can anyone see a language-agnostic way to retrieve those log entries? Thanks.

Continue reading...
 
Back
Top