我觉得有点奇怪,这个问题很简单呀! 我说的应该没问题的,<br>CreateProcess加WaitforSingleObject就足够了<br><br>//以edit.com为例<br>procedure RunFile;<br>var<br> StartupInfo:TStartupInfo;<br> ProcessInfo:TProcessInformation;<br>begin<br> FillChar(StartupInfo,Sizeof(StartupInfo),#0);<br> StartupInfo.cb := Sizeof(StartupInfo);<br> StartupInfo.dwFlags := STARTF_USESHOWWINDOW;<br> StartupInfo.wShowWindow := sw_normal;<br> CreateProcess(nil,'C:/WINDOWS/COMMAND/edit.com',<br> nil, nil,false, CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS,<br> nil, nil,StartupInfo, ProcessInfo);<br> while true do<br> begin<br> //注意你要考虑如何从这个死循环里面退出<br> WaitforSingleObject(ProcessInfo.hProcess,INFINITE);<br> CreateProcess(nil,'C:/WINDOWS/COMMAND/edit.com',<br> nil, nil,false, CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS,<br> nil, nil,StartupInfo, ProcessInfo);<br> end;<br>end;<br>如果要同时监测多个exe程序,用线程可能就可以解决了.<br><br>是不是我还没有理解你的意思?