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.

25 lines
449 B

  1. Dim s
  2. Dim sink
  3. Sub MYSINK_OnCompleted(iHResult, objErrorObject, objAsyncContext)
  4. WScript.Echo "Done"
  5. End Sub
  6. Sub MYSINK_OnObjectReady(objObject, objAsyncContext)
  7. WScript.Echo (objObject.Name)
  8. End Sub
  9. Set s = GetObject("winmgmts:")
  10. Set sink = WScript.CreateObject("WbemScripting.SWbemSink", "MYSINK_")
  11. s.Security_.ImpersonationLevel = 3
  12. s.InstancesOfAsync sink, "Win32_process"
  13. WScript.Echo "Hanging"