c的话有system函数,可以system("dir c:"); 这样。
那Delphi呢?

解决方案 »

  1.   

    WinExec,ShellExecute。WinExec('notepad.exe', SW_SHOWNORMAL);
    ShellExecute(0, 'open', 'notepad.exe' , nil, nil, SW_SHOWNORMAL) ;
      

  2.   

    在程序中调用其他外部程序,可以使用WinExec函数,其语法如下:
     
    function WinExec(lpCmdLine:LPCSTR;uCmdShow:UNIT):UNIT;
      

  3.   

    带参数的呢?
    WinExec('notepad.exe c:\a.txt', SW_SHOWNORMAL);
    像这样?