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.

26 lines
533 B

  1. function MYSINK_OnCompleted(iHResult, objErrorObject, objAsyncContext)
  2. {
  3. WScript.Echo ("Done");
  4. }
  5. function MYSINK_OnObjectReady(objObject, objAsyncContext)
  6. {
  7. WScript.Echo (objObject.Name);
  8. }
  9. var locator = WScript.CreateObject("WbemScripting.SWbemLocator");
  10. var services = locator.ConnectServer();
  11. var sink = WScript.CreateObject("WbemScripting.SWbemSink", "MYSINK_");
  12. services.Security_.ImpersonationLevel = 3;
  13. services.InstancesOfAsync(sink, "Win32_process");
  14. WScript.Echo ("Hanging");