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.

15 lines
386 B

  1. var service = GetObject("winmgmts:");
  2. var events = service.ExecNotificationQuery ("select * from __instancecreationevent where targetinstance isa 'Win32_NTLogEvent'");
  3. var ok = true;
  4. do
  5. {
  6. WScript.Echo ("Waiting for next event");
  7. var NTEvent = events.nextevent (1000);
  8. WScript.Echo (NTEvent.TargetInstance.Message);
  9. }
  10. while (ok);
  11. WScript.Echo ("finished");