I am trying to do this in Lazarus, however the program simply hangs.
What have I missed out?
Does Windows require a different method?
procedure GetIPConfigIniFile(var ipConfigOutput, iniFileOut:string);
var
AProcess: TProcess;
AStringList: TStringList;
i, adapterPos, colonPos: integer;
begin
AProcess := TProcess.Create(nil);
AStringList := TStringList.Create;
AProcess.CommandLine := 'ipconfig';
AProcess.Options := AProcess.Options + [poWaitOnExit, poUsePipes];
AProcess.Execute;
end;