You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
495 B
20 lines
495 B
on error resume next
|
|
set events = GetObject("winmgmts:").ExecNotificationQuery _
|
|
("select * from __instancecreationevent where targetinstance isa 'Win32_NTLogEvent'")
|
|
|
|
if err <> 0 then
|
|
WScript.Echo Err.Description, Err.Number, Err.Source
|
|
end if
|
|
|
|
do
|
|
set NTEvent = events.nextevent (1000)
|
|
if err <> 0 then
|
|
WScript.Echo Err.Number, Err.Description, Err.Source
|
|
else
|
|
WScript.Echo NTEvent.TargetInstance.Message
|
|
end if
|
|
exit do
|
|
loop
|
|
|
|
WScript.Echo "finished"
|
|
|