Calling ipconfig

Solved it with the following… now produces an ipconfig.log file I can use…

procedure MacroExecuteIPconfig;
var
EbookPath, CbookPath, MyProgram: String;
begin
CbookPath := “C:\Windows\System32”;
EbookPath := GetGlobalVar(“HEPublicationPath”, “”);
MyProgram := CbookPath + “cmd.exe”;
RunAProgram(MyProgram, "/C ipconfig > "+EbookPath+“ipconfig.log”, CbookPath, false, SW_SHOWNORMAL);
end;

Basically calls command prompt via cmd.exe using /C argument so it runs the command line then exits… then runs ipconfig redirecting output to the correct output folder in a file called ipconfig.log… which the rest of my php script can read it to obtain the ipv4 address for local server.