; sCommandLine := 'D:/TEMP/lha.EXE x s' + IntToStr(I) +'.lzh a:/';
// 填? StartupInfo
FillChar(lpStartupInfo, Sizeof(TStartupInfo), #0);
lpStartupInfo.cb := Sizeof(TStartupInfo);
lpStartupInfo.dwFlags := STARTF_USESHOWWINDOW;
lpStartupInfo.wShowWindow := SW_NORMAL;
bCreateProcess := CreateProcess(nil, PChar(sCommandLine),
nil, nil, True, NORMAL_PRIORITY_CLASS,
nil, nil, lpStartupInfo, lpProcessInformation);
if bCreateProcess then //等外部进程的结束
WaitForSingleObject(lpProcessInformation.hProcess, INFINITE);
....