ShellExecute & ipconfig.exe
Posted on 2000-03-09
I want to run ipconfig within my program and write the data to a file.
I tried the following codes but none of them worked.
ShellExecute(0, PChar('open'), PChar('ipconfig.exe'), PChar('/all > C:\output.tmp'), nil, SW_HIDE);
ShellExecute(0, PChar('open'), PChar('ipconfig.exe > c:\output.tmp'), PChar('/all'), nil, SW_HIDE);
If I run those commands in a DOS-Box they both work!
What am I doing wrong ??
Thanks in advance,