程式更新

ckkyjtqlt發表於2017-06-28

前提:更新程式使用NSIS打包後下載更新包

此處阻塞等待靜默包安裝覆蓋原安裝路徑下的檔案。


SHELLEXECUTEINFOA ShExecInfo = {0};

ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFOA);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = pszPath;
ShExecInfo.lpParameters = "";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteExA(&ShExecInfo);

WaitForSingleObject(ShExecInfo.hProcess,INFINITE);

等靜默安裝完成後更新介面提示

相關文章