From 00a9ec2a445e482deaeea7d85dcb2b9f7d93e55d Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 3 Dec 2020 10:45:24 -0600 Subject: WIXFEAT:4626 - Display progress for pausing updates and creating SRP --- .../WixStandardBootstrapperApplication.cpp | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'src') diff --git a/src/wixstdba/WixStandardBootstrapperApplication.cpp b/src/wixstdba/WixStandardBootstrapperApplication.cpp index c74f3087..3fa7d8a6 100644 --- a/src/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/wixstdba/WixStandardBootstrapperApplication.cpp @@ -542,6 +542,58 @@ public: // IBootstrapperApplication } + virtual STDMETHODIMP OnPauseAutomaticUpdatesBegin( + ) + { + HRESULT hr = S_OK; + LOC_STRING* pLocString = NULL; + LPWSTR sczFormattedString = NULL; + LPCWSTR wz = NULL; + + hr = __super::OnPauseAutomaticUpdatesBegin(); + + LocGetString(m_pWixLoc, L"#(loc.PauseAutomaticUpdatesMessage)", &pLocString); + + if (pLocString) + { + BalFormatString(pLocString->wzText, &sczFormattedString); + } + + wz = sczFormattedString ? sczFormattedString : L"Pausing Windows automatic updates"; + + ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, wz); + + ReleaseStr(sczFormattedString); + return hr; + } + + + virtual STDMETHODIMP OnSystemRestorePointBegin( + ) + { + HRESULT hr = S_OK; + LOC_STRING* pLocString = NULL; + LPWSTR sczFormattedString = NULL; + LPCWSTR wz = NULL; + + hr = __super::OnSystemRestorePointBegin(); + + LocGetString(m_pWixLoc, L"#(loc.SystemRestorePointMessage)", &pLocString); + + if (pLocString) + { + BalFormatString(pLocString->wzText, &sczFormattedString); + } + + wz = sczFormattedString ? sczFormattedString : L"Creating system restore point"; + + ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, wz); + + ReleaseStr(sczFormattedString); + return hr; + } + + virtual STDMETHODIMP OnCachePackageBegin( __in_z LPCWSTR wzPackageId, __in DWORD cCachePayloads, -- cgit v1.2.3-55-g6feb