WMI

List of all processes with creation time and owner
static void Test_WMIListProcesses(Args _args) {   COM WMIService = COM::getObjectEx(@"winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2"); COM processes = WMIService.ExecQuery("Select * from Win32_Process");// where Name='excel.exe'");   COMVariant userName = new COMVariant(COMVariantInOut::Out, COMVariantType::VT_BSTR);    COMVariant userDomain = new COMVariant(COMVariantInOut::Out, COMVariantType::VT_BSTR);    COMEnum2Object i = new COMEnum2Object(processes);    COM process = i.getFirst;    str time;    str reformatTime(str _WMITimeStamp)    {        str yy = subStr(_WMITimeStamp, 1, 4);        str mm = subStr(_WMITimeStamp, 5, 2);        str dd = subStr(_WMITimeStamp, 7, 2);        str hh = subStr(_WMITimeStamp, 9, 2);        str m = subStr(_WMITimeStamp, 11, 2);        return dd+'.'+mm+'.'+yy+' '+ hh +':' + m;    }    while(process)    {        info(process.Name);        if (process.Name!='System Idle Process'            &&            process.Name!='System'        )        {            time = process.CreationDate; info(reformatTime(time)); process.GetOwner(userName, userDomain); info( userName.bStr + " | " + userDomain.bStr); }       process = i.getNext; } }