Leaked source code of windows server 2003
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.
|
|
on error resume next set events = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecNotificationQuery _ ("select * from __instancecreationevent where targetinstance isa 'Win32_NTLogEvent'")
if err <> 0 then WScript.Echo Err.Description, Err.Number, Err.Source end if
do ' Note that the timeout value below (in ms) passed ' as an argument can explicitly specified
set NTEvent = events.nextevent () 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"
|