改用CreateProcess吧<br>var<br> zAppName:array[0..512] of char;<br> StartupInfo:TStartupInfo;<br> ProcessInfo:TProcessInformation;<br>begin<br> zAppName:='c:/windows/calc.exe' <br> FillChar(StartupInfo,Sizeof(StartupInfo),#0);<br> StartupInfo.cb := Sizeof(StartupInfo);<br> StartupInfo.dwFlags := STARTF_USESHOWWINDOW;<br> StartupInfo.wShowWindow := SW_MINIMIZE;<br> if not CreateProcess(nil,<br> zAppName, { pointer to command line string }<br> nil, { pointer to process securityattributes }<br> nil, { pointer to thread security attributes }<br> false, { handle inheritance flag }<br> NORMAL_PRIORITY_CLASS,<br> nil, { pointer to new environment block }<br> nil, { pointer to current directory name }<br> StartupInfo, { pointer to STARTUPINFO }<br> ProcessInfo) { pointer to PROCESS_INF }<br> then <br> raise Exception.Create('execution error!')<br>end;