diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/burn/engine/apply.cpp | 18 | ||||
| -rw-r--r-- | src/burn/engine/userexperience.cpp | 68 | ||||
| -rw-r--r-- | src/burn/engine/userexperience.h | 3 |
3 files changed, 14 insertions, 75 deletions
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index 9e552ee0..e2939f40 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp | |||
| @@ -3049,6 +3049,7 @@ static int GenericExecuteMessageHandler( | |||
| 3049 | BURN_EXECUTE_CONTEXT* pContext = (BURN_EXECUTE_CONTEXT*)pvContext; | 3049 | BURN_EXECUTE_CONTEXT* pContext = (BURN_EXECUTE_CONTEXT*)pvContext; |
| 3050 | DWORD dwAllowedResults = pMessage->dwUIHint & MB_TYPEMASK; | 3050 | DWORD dwAllowedResults = pMessage->dwUIHint & MB_TYPEMASK; |
| 3051 | int nResult = IDNOACTION; | 3051 | int nResult = IDNOACTION; |
| 3052 | BOOL fPassthrough = FALSE; | ||
| 3052 | 3053 | ||
| 3053 | switch (pMessage->type) | 3054 | switch (pMessage->type) |
| 3054 | { | 3055 | { |
| @@ -3065,11 +3066,15 @@ static int GenericExecuteMessageHandler( | |||
| 3065 | 3066 | ||
| 3066 | case GENERIC_EXECUTE_MESSAGE_NETFX_FILES_IN_USE: | 3067 | case GENERIC_EXECUTE_MESSAGE_NETFX_FILES_IN_USE: |
| 3067 | UserExperienceOnExecuteFilesInUse(pContext->pUX, pContext->pExecutingPackage->sczId, pMessage->filesInUse.cFiles, pMessage->filesInUse.rgwzFiles, BOOTSTRAPPER_FILES_IN_USE_TYPE_NETFX, &nResult); // ignore return value. | 3068 | UserExperienceOnExecuteFilesInUse(pContext->pUX, pContext->pExecutingPackage->sczId, pMessage->filesInUse.cFiles, pMessage->filesInUse.rgwzFiles, BOOTSTRAPPER_FILES_IN_USE_TYPE_NETFX, &nResult); // ignore return value. |
| 3068 | dwAllowedResults = BURN_MB_NETFX_FILES_IN_USE; | 3069 | fPassthrough = TRUE; |
| 3069 | break; | 3070 | break; |
| 3070 | } | 3071 | } |
| 3071 | 3072 | ||
| 3072 | nResult = UserExperienceCheckExecuteResult(pContext->pUX, pContext->fRollback, dwAllowedResults, nResult); | 3073 | if (!fPassthrough) |
| 3074 | { | ||
| 3075 | nResult = UserExperienceCheckExecuteResult(pContext->pUX, pContext->fRollback, dwAllowedResults, nResult); | ||
| 3076 | } | ||
| 3077 | |||
| 3073 | return nResult; | 3078 | return nResult; |
| 3074 | } | 3079 | } |
| 3075 | 3080 | ||
| @@ -3082,6 +3087,7 @@ static int MsiExecuteMessageHandler( | |||
| 3082 | DWORD dwAllowedResults = pMessage->dwUIHint & MB_TYPEMASK; | 3087 | DWORD dwAllowedResults = pMessage->dwUIHint & MB_TYPEMASK; |
| 3083 | int nResult = IDNOACTION; | 3088 | int nResult = IDNOACTION; |
| 3084 | BOOL fRestartManager = FALSE; | 3089 | BOOL fRestartManager = FALSE; |
| 3090 | BOOL fPassthrough = FALSE; | ||
| 3085 | 3091 | ||
| 3086 | switch (pMessage->type) | 3092 | switch (pMessage->type) |
| 3087 | { | 3093 | { |
| @@ -3107,11 +3113,15 @@ static int MsiExecuteMessageHandler( | |||
| 3107 | __fallthrough; | 3113 | __fallthrough; |
| 3108 | case WIU_MSI_EXECUTE_MESSAGE_MSI_FILES_IN_USE: | 3114 | case WIU_MSI_EXECUTE_MESSAGE_MSI_FILES_IN_USE: |
| 3109 | UserExperienceOnExecuteFilesInUse(pContext->pUX, pContext->pExecutingPackage->sczId, pMessage->msiFilesInUse.cFiles, pMessage->msiFilesInUse.rgwzFiles, fRestartManager ? BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI_RM : BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI, &nResult); // ignore return value. | 3115 | UserExperienceOnExecuteFilesInUse(pContext->pUX, pContext->pExecutingPackage->sczId, pMessage->msiFilesInUse.cFiles, pMessage->msiFilesInUse.rgwzFiles, fRestartManager ? BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI_RM : BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI, &nResult); // ignore return value. |
| 3110 | dwAllowedResults = fRestartManager ? BURN_MB_MSI_RM_FILES_IN_USE : BURN_MB_MSI_FILES_IN_USE; | 3116 | fPassthrough = TRUE; |
| 3111 | break; | 3117 | break; |
| 3112 | } | 3118 | } |
| 3113 | 3119 | ||
| 3114 | nResult = UserExperienceCheckExecuteResult(pContext->pUX, pContext->fRollback, dwAllowedResults, nResult); | 3120 | if (!fPassthrough) |
| 3121 | { | ||
| 3122 | nResult = UserExperienceCheckExecuteResult(pContext->pUX, pContext->fRollback, dwAllowedResults, nResult); | ||
| 3123 | } | ||
| 3124 | |||
| 3115 | return nResult; | 3125 | return nResult; |
| 3116 | } | 3126 | } |
| 3117 | 3127 | ||
diff --git a/src/burn/engine/userexperience.cpp b/src/burn/engine/userexperience.cpp index 7cc6f049..ee22a318 100644 --- a/src/burn/engine/userexperience.cpp +++ b/src/burn/engine/userexperience.cpp | |||
| @@ -2607,54 +2607,6 @@ static int FilterResult( | |||
| 2607 | } | 2607 | } |
| 2608 | break; | 2608 | break; |
| 2609 | 2609 | ||
| 2610 | case BURN_MB_MSI_FILES_IN_USE: | ||
| 2611 | // https://docs.microsoft.com/en-us/windows/win32/msi/installvalidate-action | ||
| 2612 | if (IDRETRY == nResult || IDTRYAGAIN == nResult) | ||
| 2613 | { | ||
| 2614 | nResult = IDRETRY; | ||
| 2615 | } | ||
| 2616 | else if (IDCANCEL == nResult || IDABORT == nResult) | ||
| 2617 | { | ||
| 2618 | nResult = IDCANCEL; | ||
| 2619 | } | ||
| 2620 | else if (IDCONTINUE == nResult || IDIGNORE == nResult) | ||
| 2621 | { | ||
| 2622 | nResult = IDIGNORE; | ||
| 2623 | } | ||
| 2624 | else | ||
| 2625 | { | ||
| 2626 | nResult = IDNOACTION; | ||
| 2627 | } | ||
| 2628 | break; | ||
| 2629 | |||
| 2630 | case BURN_MB_MSI_RM_FILES_IN_USE: | ||
| 2631 | // https://docs.microsoft.com/en-us/windows/win32/msi/using-restart-manager-with-an-external-ui- | ||
| 2632 | if (IDOK == nResult || IDYES == nResult) | ||
| 2633 | { | ||
| 2634 | nResult = IDOK; | ||
| 2635 | } | ||
| 2636 | else if (IDCONTINUE == nResult || IDIGNORE == nResult) | ||
| 2637 | { | ||
| 2638 | nResult = IDIGNORE; | ||
| 2639 | } | ||
| 2640 | else if (IDNO == nResult) | ||
| 2641 | { | ||
| 2642 | nResult = IDNO; | ||
| 2643 | } | ||
| 2644 | else if (IDCANCEL == nResult || IDABORT == nResult) | ||
| 2645 | { | ||
| 2646 | nResult = IDCANCEL; | ||
| 2647 | } | ||
| 2648 | else if (IDRETRY == nResult || IDTRYAGAIN == nResult) | ||
| 2649 | { | ||
| 2650 | nResult = IDRETRY; | ||
| 2651 | } | ||
| 2652 | else | ||
| 2653 | { | ||
| 2654 | nResult = IDNOACTION; | ||
| 2655 | } | ||
| 2656 | break; | ||
| 2657 | |||
| 2658 | case BURN_MB_RETRYTRYAGAIN: // custom return code. | 2610 | case BURN_MB_RETRYTRYAGAIN: // custom return code. |
| 2659 | if (IDRETRY != nResult && IDTRYAGAIN != nResult) | 2611 | if (IDRETRY != nResult && IDTRYAGAIN != nResult) |
| 2660 | { | 2612 | { |
| @@ -2662,26 +2614,6 @@ static int FilterResult( | |||
| 2662 | } | 2614 | } |
| 2663 | break; | 2615 | break; |
| 2664 | 2616 | ||
| 2665 | case BURN_MB_NETFX_FILES_IN_USE: | ||
| 2666 | // https://docs.microsoft.com/en-us/dotnet/framework/deployment/how-to-get-progress-from-the-dotnet-installer | ||
| 2667 | if (IDOK == nResult || IDYES == nResult) | ||
| 2668 | { | ||
| 2669 | nResult = IDYES; | ||
| 2670 | } | ||
| 2671 | else if (IDRETRY == nResult || IDTRYAGAIN == nResult) | ||
| 2672 | { | ||
| 2673 | nResult = IDRETRY; | ||
| 2674 | } | ||
| 2675 | else if (IDCANCEL == nResult || IDABORT == nResult) | ||
| 2676 | { | ||
| 2677 | nResult = IDCANCEL; | ||
| 2678 | } | ||
| 2679 | else | ||
| 2680 | { | ||
| 2681 | nResult = IDNO; | ||
| 2682 | } | ||
| 2683 | break; | ||
| 2684 | |||
| 2685 | default: | 2617 | default: |
| 2686 | AssertSz(FALSE, "Unknown allowed results."); | 2618 | AssertSz(FALSE, "Unknown allowed results."); |
| 2687 | break; | 2619 | break; |
diff --git a/src/burn/engine/userexperience.h b/src/burn/engine/userexperience.h index 75723afa..27d0a1e3 100644 --- a/src/burn/engine/userexperience.h +++ b/src/burn/engine/userexperience.h | |||
| @@ -11,9 +11,6 @@ extern "C" { | |||
| 11 | // constants | 11 | // constants |
| 12 | 12 | ||
| 13 | const DWORD BURN_MB_RETRYTRYAGAIN = 0x10; | 13 | const DWORD BURN_MB_RETRYTRYAGAIN = 0x10; |
| 14 | const DWORD BURN_MB_MSI_FILES_IN_USE = 0x11; | ||
| 15 | const DWORD BURN_MB_MSI_RM_FILES_IN_USE = 0x12; | ||
| 16 | const DWORD BURN_MB_NETFX_FILES_IN_USE = 0x13; | ||
| 17 | 14 | ||
| 18 | 15 | ||
| 19 | // structs | 16 | // structs |
