But when I start it from PellesC IDE (button "Execute" under the menu) I have error "command systeminfo not found" - because cmd.exe don't found this program. Also , same errors are with ping.exe , tracert and other. Why?
When the cmd window opens and displays the error method, type
path <return> you will see the problem.
You could use this format as well as TimoVJL more versatile (better) solution:
WinExec("cmd.exe /k c:\\windows\\syswow64\\systeminfo.exe",SW_SHOW);
or
WinExec("cmd.exe /k c:\\windows\\system32\\systeminfo.exe",SW_SHOW);
John Z
BTW - if you run the resulting exe outside of Pelles UI you will see that your original code does work, and if you again type
path <return> you will see why....