Revision | 29287 (tree) |
---|---|
Time | 2021-10-30 20:58:45 |
Author | stefankueng |
show errors when deploying
@@ -73,7 +73,16 @@ | ||
73 | 73 | if (!SUCCEEDED(deployResult.ExtendedErrorCode())) |
74 | 74 | { |
75 | 75 | // Deployment failed |
76 | - return deployResult.ExtendedErrorCode(); | |
76 | + PMSIHANDLE hRecord = MsiCreateRecord(0); | |
77 | + std::wstring error = L"AddPackageByUriAsync failed (Errorcode: "; | |
78 | + error += std::to_wstring(deployResult.ExtendedErrorCode()); | |
79 | + error += L"):\n"; | |
80 | + error += deployResult.ErrorText(); | |
81 | + MsiRecordSetStringW(hRecord, 0, error.c_str()); | |
82 | + MsiProcessMessage(hModule, INSTALLMESSAGE_ERROR, hRecord); | |
83 | + MsiCloseHandle(hRecord); | |
84 | + | |
85 | + return ERROR_INSTALL_FAILURE; | |
77 | 86 | } |
78 | 87 | return ERROR_SUCCESS; |
79 | 88 | } |