From 9e2cda60e3852660f235beb5e0af1c746d0045e6 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 15 Dec 2021 10:48:06 -0600 Subject: FilesInUse messages are too different to unify in the Burn engine. Fixes #6348 --- src/libs/dutil/WixToolset.DUtil/inc/wiutil.h | 4 ++-- src/libs/dutil/WixToolset.DUtil/wiutil.cpp | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src/libs') diff --git a/src/libs/dutil/WixToolset.DUtil/inc/wiutil.h b/src/libs/dutil/WixToolset.DUtil/inc/wiutil.h index 9c2de209..0ddcd893 100644 --- a/src/libs/dutil/WixToolset.DUtil/inc/wiutil.h +++ b/src/libs/dutil/WixToolset.DUtil/inc/wiutil.h @@ -9,7 +9,6 @@ extern "C" { // constants #define IDNOACTION 0 -#define WIU_MB_OKIGNORECANCELRETRY 0xE #define MAX_DARWIN_KEY 73 #define MAX_DARWIN_COLUMN 255 @@ -37,6 +36,7 @@ typedef enum WIU_MSI_EXECUTE_MESSAGE_TYPE WIU_MSI_EXECUTE_MESSAGE_ERROR, WIU_MSI_EXECUTE_MESSAGE_MSI_MESSAGE, WIU_MSI_EXECUTE_MESSAGE_MSI_FILES_IN_USE, + WIU_MSI_EXECUTE_MESSAGE_MSI_RM_FILES_IN_USE, } WIU_MSI_EXECUTE_MESSAGE_TYPE; @@ -45,7 +45,7 @@ typedef enum WIU_MSI_EXECUTE_MESSAGE_TYPE typedef struct _WIU_MSI_EXECUTE_MESSAGE { WIU_MSI_EXECUTE_MESSAGE_TYPE type; - DWORD dwAllowedResults; + DWORD dwUIHint; DWORD cData; LPCWSTR* rgwzData; diff --git a/src/libs/dutil/WixToolset.DUtil/wiutil.cpp b/src/libs/dutil/WixToolset.DUtil/wiutil.cpp index 7414ac42..da7cffe7 100644 --- a/src/libs/dutil/WixToolset.DUtil/wiutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/wiutil.cpp @@ -113,6 +113,7 @@ static INT SendErrorMessage( ); static INT SendFilesInUseMessage( __in WIU_MSI_EXECUTE_CONTEXT* pContext, + __in UINT uiFlags, __in_opt MSIHANDLE hRecord, __in BOOL fRestartManagerRequest ); @@ -1161,7 +1162,7 @@ Trace(REPORT_STANDARD, "MSI install[%x]: %ls", pContext->dwCurrentProgressIndex, case INSTALLMESSAGE_FILESINUSE: case INSTALLMESSAGE_RMFILESINUSE: - nResult = SendFilesInUseMessage(pContext, hRecord, INSTALLMESSAGE_RMFILESINUSE == mt); + nResult = SendFilesInUseMessage(pContext, uiFlags, hRecord, INSTALLMESSAGE_RMFILESINUSE == mt); break; /* @@ -1401,7 +1402,7 @@ static INT SendMsiMessage( InitializeMessageData(hRecord, &rgsczData, &cData); message.type = WIU_MSI_EXECUTE_MESSAGE_MSI_MESSAGE; - message.dwAllowedResults = uiFlags; + message.dwUIHint = uiFlags; message.cData = cData; message.rgwzData = (LPCWSTR*)rgsczData; message.msiMessage.mt = mt; @@ -1445,7 +1446,7 @@ static INT SendErrorMessage( InitializeMessageData(hRecord, &rgsczData, &cData); message.type = WIU_MSI_EXECUTE_MESSAGE_ERROR; - message.dwAllowedResults = uiFlags; + message.dwUIHint = uiFlags; message.nResultRecommendation = nResult; message.cData = cData; message.rgwzData = (LPCWSTR*)rgsczData; @@ -1459,8 +1460,9 @@ static INT SendErrorMessage( static INT SendFilesInUseMessage( __in WIU_MSI_EXECUTE_CONTEXT* pContext, + __in UINT uiFlags, __in_opt MSIHANDLE hRecord, - __in BOOL /*fRestartManagerRequest*/ + __in BOOL fRestartManagerRequest ) { INT nResult = IDNOACTION; @@ -1470,8 +1472,8 @@ static INT SendFilesInUseMessage( InitializeMessageData(hRecord, &rgsczData, &cData); - message.type = WIU_MSI_EXECUTE_MESSAGE_MSI_FILES_IN_USE; - message.dwAllowedResults = WIU_MB_OKIGNORECANCELRETRY; + message.type = fRestartManagerRequest ? WIU_MSI_EXECUTE_MESSAGE_MSI_RM_FILES_IN_USE : WIU_MSI_EXECUTE_MESSAGE_MSI_FILES_IN_USE; + message.dwUIHint = uiFlags; message.cData = cData; message.rgwzData = (LPCWSTR*)rgsczData; message.msiFilesInUse.cFiles = message.cData; // point the files in use information to the message record information. @@ -1527,7 +1529,7 @@ static INT SendProgressUpdate( #endif message.type = WIU_MSI_EXECUTE_MESSAGE_PROGRESS; - message.dwAllowedResults = MB_OKCANCEL; + message.dwUIHint = MB_OKCANCEL; message.progress.dwPercentage = dwPercentage; nResult = pContext->pfnMessageHandler(&message, pContext->pvContext); -- cgit v1.2.3-55-g6feb