SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "E://My Documents//Honeywell//Plan_Estimate//zip//extract.bat";
ShExecInfo.lpParameters = "";
ShExecInfo.lpDirectory = "E://My Documents//Honeywell//Plan_Estimate//zip//";
ShExecInfo.nShow = SW_HIDE;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess, INFINITE);
注:此处调用的批处理文件中最后须添加exit语句,否则WaitForSingleObject将永远不会返回!
-----------------------------------------------------------------------------------------------------------