diff options
Diffstat (limited to 'src/wixstdba/WixStandardBootstrapperApplication.cpp')
-rw-r--r-- | src/wixstdba/WixStandardBootstrapperApplication.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/wixstdba/WixStandardBootstrapperApplication.cpp b/src/wixstdba/WixStandardBootstrapperApplication.cpp index 69913de2..dd7ad229 100644 --- a/src/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/wixstdba/WixStandardBootstrapperApplication.cpp | |||
@@ -456,6 +456,53 @@ public: // IBootstrapperApplication | |||
456 | } | 456 | } |
457 | 457 | ||
458 | 458 | ||
459 | virtual STDMETHODIMP OnPlanMsiPackage( | ||
460 | __in_z LPCWSTR wzPackageId, | ||
461 | __in BOOL fExecute, | ||
462 | __in BOOTSTRAPPER_ACTION_STATE action, | ||
463 | __inout BOOL* pfCancel, | ||
464 | __inout BURN_MSI_PROPERTY* pActionMsiProperty, | ||
465 | __inout INSTALLUILEVEL* pUiLevel, | ||
466 | __inout BOOL* pfDisableExternalUiHandler | ||
467 | ) | ||
468 | { | ||
469 | HRESULT hr = S_OK; | ||
470 | WIXSTDBA_PACKAGE_INFO* pPackageInfo = NULL; | ||
471 | BAL_INFO_PACKAGE* pPackage = NULL; | ||
472 | BOOL fShowInternalUI = FALSE; | ||
473 | INSTALLUILEVEL uiLevel = INSTALLUILEVEL_NOCHANGE; | ||
474 | |||
475 | switch (m_command.display) | ||
476 | { | ||
477 | case BOOTSTRAPPER_DISPLAY_FULL: | ||
478 | uiLevel = INSTALLUILEVEL_FULL; | ||
479 | break; | ||
480 | |||
481 | case BOOTSTRAPPER_DISPLAY_PASSIVE: | ||
482 | uiLevel = INSTALLUILEVEL_REDUCED; | ||
483 | break; | ||
484 | } | ||
485 | |||
486 | if (INSTALLUILEVEL_NOCHANGE != uiLevel) | ||
487 | { | ||
488 | hr = GetPackageInfo(wzPackageId, &pPackageInfo, &pPackage); | ||
489 | if (SUCCEEDED(hr) && pPackage->sczDisplayInternalUICondition) | ||
490 | { | ||
491 | hr = BalEvaluateCondition(pPackage->sczDisplayInternalUICondition, &fShowInternalUI); | ||
492 | BalExitOnFailure(hr, "Failed to evaluate condition for package '%ls': %ls", wzPackageId, pPackage->sczDisplayInternalUICondition); | ||
493 | |||
494 | if (fShowInternalUI) | ||
495 | { | ||
496 | *pUiLevel = uiLevel; | ||
497 | } | ||
498 | } | ||
499 | } | ||
500 | |||
501 | LExit: | ||
502 | return __super::OnPlanMsiPackage(wzPackageId, fExecute, action, pfCancel, pActionMsiProperty, pUiLevel, pfDisableExternalUiHandler); | ||
503 | } | ||
504 | |||
505 | |||
459 | virtual STDMETHODIMP OnPlanComplete( | 506 | virtual STDMETHODIMP OnPlanComplete( |
460 | __in HRESULT hrStatus | 507 | __in HRESULT hrStatus |
461 | ) | 508 | ) |