ShellExcute执行完再往下执行

SHELLEXECUTEINFO ShExecInfo={0}; 
ShExecInfo.cbSize=sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask=SEE_MASK_NOCLOSEPROCESS; 
ShExecInfo.hwnd=NULL; 
ShExecInfo.lpVerb=NULL; 
ShExecInfo.lpFile= CutExePath;
ShExecInfo.lpParameters=NULL;
ShExecInfo.lpDirectory=NULL; 
ShExecInfo.nShow=SW_HIDE; 
ShExecInfo.hInstApp=NULL;
ShellExecuteEx(&ShExecInfo); 

WaitForSingleObject(ShExecInfo.hProcess,INFINITE); //关键

你可能感兴趣的:(ShellExcute执行完再往下执行)