delphi调用cmd的两种方法vars:string;begins:='cmd.exe /c '+edit1.Text+' >c:\1.txt';winexec(pchar(s),sw_hide);sleep(2000);memo1.Lines.LoadFromFile('c:\1.txt'); 2shellexecute(handle,nil,'cmd.exe',pchar(form2.edit1.text),nil,sw_hide);WinExec主要运行EXE文件.如:WinExec(’…