It doesn't use Shell or TProcess or RunCommand.
It's utils.runprocess does use TProcess, but doesn't do anything new or special. It is just one of many of the homebrewn tprocess wrappers. RunCommand is meant to be a superset of those, and in FPC 3.2+ TProcess contains the main, parameterized loop of runcommand, so that these old ones can be reimplemented to use the RunCommand mainloop.
Because of this thread I added showwindow parameters to runcommand in r43208. If it causes no problems, I'll merge it to 3.2 in a few days.
Runcommand has many overloaded forms, but looks generally something like this:
function RunCommand(const exename:TProcessString;const commands:array of TProcessString;out outputstring:string; Options : TProcessOptions = [];SWOptions:TShowWindowOptions=swoNone):boolean;
Var
p : TProcessnamemacro;
i,
exitstatus : integer;
ErrorString : String;
begin
p:=DefaultTProcess.create(nil);
if Options<>[] then
P.Options:=Options - ForbiddenOptions;
P.ShowWindow:=SwOptions;
p.Executable:=exename;
if high(commands)>=0 then
for i:=low(commands) to high(commands) do
p.Parameters.add(commands[i]);
try
result:=p.RunCommandLoop(outputstring,errorstring,exitstatus)=0;
finally
p.free;
end;
if exitstatus<>0 then result:=false;
end;