diff options
| author | Nir Bar <nir.bar@panel-sw.co.il> | 2022-12-06 13:22:41 +0200 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-12-12 21:50:39 -0600 |
| commit | 50e24e9cf2084b6cb67b5d8fc509163061408bb6 (patch) | |
| tree | 05c9df57480eb6308c3462c13847b43288f9dbb4 /src/libs | |
| parent | c54f3083489827a1e57c6fd7f3d76f62ddc6e85e (diff) | |
| download | wix-50e24e9cf2084b6cb67b5d8fc509163061408bb6.tar.gz wix-50e24e9cf2084b6cb67b5d8fc509163061408bb6.tar.bz2 wix-50e24e9cf2084b6cb67b5d8fc509163061408bb6.zip | |
Use MSI transaction end result to detect whether reboot is needed
Diffstat (limited to 'src/libs')
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/inc/wiutil.h | 3 | ||||
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/wiutil.cpp | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/wiutil.h b/src/libs/dutil/WixToolset.DUtil/inc/wiutil.h index 0ddcd893..71f40e8a 100644 --- a/src/libs/dutil/WixToolset.DUtil/inc/wiutil.h +++ b/src/libs/dutil/WixToolset.DUtil/inc/wiutil.h | |||
| @@ -392,7 +392,8 @@ HRESULT DAPI WiuBeginTransaction( | |||
| 392 | HRESULT DAPI WiuEndTransaction( | 392 | HRESULT DAPI WiuEndTransaction( |
| 393 | __in DWORD dwTransactionState, | 393 | __in DWORD dwTransactionState, |
| 394 | __in DWORD dwLogMode, | 394 | __in DWORD dwLogMode, |
| 395 | __in_z LPCWSTR szLogPath | 395 | __in_z LPCWSTR szLogPath, |
| 396 | __out WIU_RESTART *pRestart | ||
| 396 | ); | 397 | ); |
| 397 | BOOL DAPI WiuIsMsiTransactionSupported( | 398 | BOOL DAPI WiuIsMsiTransactionSupported( |
| 398 | ); | 399 | ); |
diff --git a/src/libs/dutil/WixToolset.DUtil/wiutil.cpp b/src/libs/dutil/WixToolset.DUtil/wiutil.cpp index 4ed0e2c5..dac57a3d 100644 --- a/src/libs/dutil/WixToolset.DUtil/wiutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/wiutil.cpp | |||
| @@ -317,7 +317,7 @@ extern "C" HRESULT DAPI WiuGetComponentPath( | |||
| 317 | } | 317 | } |
| 318 | 318 | ||
| 319 | // If the actual path length is greater than or equal to the original buffer | 319 | // If the actual path length is greater than or equal to the original buffer |
| 320 | // allocate a larger buffer and get the path again, just in case we are | 320 | // allocate a larger buffer and get the path again, just in case we are |
| 321 | // missing any part of the path. | 321 | // missing any part of the path. |
| 322 | if (cchCompare <= cch) | 322 | if (cchCompare <= cch) |
| 323 | { | 323 | { |
| @@ -369,7 +369,7 @@ extern "C" HRESULT DAPI WiuLocateComponent( | |||
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | // If the actual path length is greater than or equal to the original buffer | 371 | // If the actual path length is greater than or equal to the original buffer |
| 372 | // allocate a larger buffer and get the path again, just in case we are | 372 | // allocate a larger buffer and get the path again, just in case we are |
| 373 | // missing any part of the path. | 373 | // missing any part of the path. |
| 374 | if (cchCompare <= cch) | 374 | if (cchCompare <= cch) |
| 375 | { | 375 | { |
| @@ -993,7 +993,8 @@ LExit: | |||
| 993 | extern "C" HRESULT DAPI WiuEndTransaction( | 993 | extern "C" HRESULT DAPI WiuEndTransaction( |
| 994 | __in DWORD dwTransactionState, | 994 | __in DWORD dwTransactionState, |
| 995 | __in DWORD dwLogMode, | 995 | __in DWORD dwLogMode, |
| 996 | __in_z LPCWSTR szLogPath | 996 | __in_z LPCWSTR szLogPath, |
| 997 | __out WIU_RESTART *pRestart | ||
| 997 | ) | 998 | ) |
| 998 | { | 999 | { |
| 999 | HRESULT hr = S_OK; | 1000 | HRESULT hr = S_OK; |
| @@ -1008,6 +1009,7 @@ extern "C" HRESULT DAPI WiuEndTransaction( | |||
| 1008 | WiuExitOnFailure(hr, "Failed to enable logging for MSI transaction"); | 1009 | WiuExitOnFailure(hr, "Failed to enable logging for MSI transaction"); |
| 1009 | 1010 | ||
| 1010 | er = vpfnMsiEndTransaction(dwTransactionState); | 1011 | er = vpfnMsiEndTransaction(dwTransactionState); |
| 1012 | er = CheckForRestartErrorCode(er, pRestart); | ||
| 1011 | WiuExitOnWin32Error(er, hr, "Failed to end transaction."); | 1013 | WiuExitOnWin32Error(er, hr, "Failed to end transaction."); |
| 1012 | 1014 | ||
| 1013 | LExit: | 1015 | LExit: |
