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.
15 lines
386 B
15 lines
386 B
var service = GetObject("winmgmts:");
|
|
var events = service.ExecNotificationQuery ("select * from __instancecreationevent where targetinstance isa 'Win32_NTLogEvent'");
|
|
|
|
var ok = true;
|
|
|
|
do
|
|
{
|
|
WScript.Echo ("Waiting for next event");
|
|
var NTEvent = events.nextevent (1000);
|
|
WScript.Echo (NTEvent.TargetInstance.Message);
|
|
}
|
|
while (ok);
|
|
|
|
WScript.Echo ("finished");
|
|
|