We are using VB script in order to get all the process list of system which was working fine before we tried to use 64 bit executable because vb script is not compatible with 64 bit. The previous code is given below.
OleObject mssc
int li_rc, i
string ls_code, ls_res
Any res
mssc = CREATE OleObject
li_rc = mssc.ConnectToNewObject( "MSScriptControl.ScriptControl" )
mssc.language = "VBScript"
ls_code = "function services() ~r~nstrComputer=~".~"~r~nSet objWMIService = GetObject(~"winmgmts:~"" + &
"& ~"{impersonationLevel=impersonate}!\\~" & strComputer & ~"\root\cimv2~")~r~n" + &
"Set colProcesses = objWMIService.ExecQuery(~"select * from win32_process~" )~r~n" + &
"s = ~"~"~r~nFor Each objProcess In colProcesses~r~n" + &
" s = s & objProcess.ProcessId & ~",~"~r~nNext~r~nservices = s~r~nend function"
mssc.AddCode(ls_code)
ls_res = string(mssc.Eval("services()"))
The above code return a string (comma separated) of all the processes IDs.
Can someone help to replace above code for 64 bit, any function of PB or something which can run successfully on 64 bit system.