Dobrý den.
Nějak nemohu pohnout s tým co tu dal pan Jan Fiala.
Ve stringu s mi to vrací cestu k souboru .LOG
var
s: String;
sl: TStringList;
begin
s := ChangeFileExt(Application.ExeName, '.LOG');
ShellExecute(0, 'Open', 'C:\Windows\System32\IPConfig.exe', PWideChar('>'+s), nil, SW_normal);
Sleep(200);
sl := TStringList.Create;
sl.LoadFromFile(s);
Pokud jsem to pochopil tak si to uloží do toho souboru LOG výpis s IPConfig a pak načte do s.
Je to to same, když použijí toto?
ShellExecute( handle, 'open', 'cmd.exe', '/q /c ipconfig -all > C:\logs1.txt', nil ,SW_SHOWNORMAL );