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.
 
 
 
 
 
 

32 lines
742 B

function MYSINK_OnCompleted(iHResult, objErrorObject, objAsyncContext)
{
WScript.Echo ("Done");
}
function MYSINK_OnObjectReady(objObject, objAsyncContext)
{
WScript.Echo (objObject.Name);
}
WScript.Echo("CreateObject");
var locator = WScript.CreateObject("WbemScripting.SWbemLocator");
WScript.Echo("ConnectServer");
var services = locator.ConnectServer();
WScript.Echo("CreateSink");
var sink = WScript.CreateObject("WbemScripting.SWbemSink", "MYSINK_");
WScript.Echo("Sec");
WScript.Echo(services.Security_.ImpersonationLevel);
services.Security_.ImpersonationLevel = 3;
WScript.Echo("InstancesOf");
services.InstancesOfAsync(sink, "Win32_process");
WScript.Echo ("Hanging");