Get process info when running in administrator
Posted: Thu Jun 12, 2014 8:13 pm
Hi,
I test madshi for my company before buy it.
This delphi code:
And the result:
But if the app is running whit "Execute as administrator" the result is :
I'don't view the exe path and the handle is false.
How can i do for resolve that.
Thank's
I test madshi for my company before buy it.
This delphi code:
Code: Select all
countProcesses := Processes.ItemCount;
for i1 := 0 to countProcesses - 1 do
begin
exe:=Processes.Items[i1].ExeFile;
if UpperCase( exe).Contains( UpperCase('GecoMaes.exe')) then
begin
ip := Processes.Items[i1];
mmo1.Lines.Add('IProcess.Session:' + ip.Session.ToString());
mmo1.Lines.Add('IProcess.GetHandle:' + ip.GetHandle().Handle.ToString());
mmo1.Lines.Add('ExeFile:' + Processes.Items[i1].ExeFile);
mmo1.Lines.Add('UserName:' + Processes.Items[i1].UserName);
end;
end;
Code: Select all
IProcess.Session:1
IProcess.GetHandle:424
ExeFile:C:\aaaaaa\bbbb\jjjjjjjj.exe
UserName:xxxxxx
Code: Select all
IProcess.Session:1
IProcess.GetHandle:4294967295
ExeFile:GecoMaes.exe
UserName:
How can i do for resolve that.
Thank's