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
将永远不会返回!
———————————————————————————————————–