WIXFEAT:4626 - Display progress for pausing updates and creating SRP
Sean Hall committed
Dec 3, 2020 at 10:45 UTC
00a9ec2a445e482deaeea7d85dcb2b9f7d93e55d
1 file changed
+52
src/wixstdba/WixStandardBootstrapperApplication.cpp
+52
@@ -542,6 +542,58 @@ public: // IBootstrapperApplication
542
}
543
544
545
+ virtual STDMETHODIMP OnPauseAutomaticUpdatesBegin(
546
+ )
547
+ {
548
+ HRESULT hr = S_OK;
549
+ LOC_STRING* pLocString = NULL;
550
+ LPWSTR sczFormattedString = NULL;
551
+ LPCWSTR wz = NULL;
552
+
553
+ hr = __super::OnPauseAutomaticUpdatesBegin();
554
+
555
+ LocGetString(m_pWixLoc, L"#(loc.PauseAutomaticUpdatesMessage)", &pLocString);
556
+
557
+ if (pLocString)
558
+ {
559
+ BalFormatString(pLocString->wzText, &sczFormattedString);
560
+ }
561
+
562
+ wz = sczFormattedString ? sczFormattedString : L"Pausing Windows automatic updates";
563
+
564
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, wz);
565
+
566
+ ReleaseStr(sczFormattedString);
567
+ return hr;
568
+ }
569
+
570
+
571
+ virtual STDMETHODIMP OnSystemRestorePointBegin(
572
+ )
573
+ {
574
+ HRESULT hr = S_OK;
575
+ LOC_STRING* pLocString = NULL;
576
+ LPWSTR sczFormattedString = NULL;
577
+ LPCWSTR wz = NULL;
578
+
579
+ hr = __super::OnSystemRestorePointBegin();
580
+
581
+ LocGetString(m_pWixLoc, L"#(loc.SystemRestorePointMessage)", &pLocString);
582
+
583
+ if (pLocString)
584
+ {
585
+ BalFormatString(pLocString->wzText, &sczFormattedString);
586
+ }
587
+
588
+ wz = sczFormattedString ? sczFormattedString : L"Creating system restore point";
589
+
590
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, wz);
591
+
592
+ ReleaseStr(sczFormattedString);
593
+ return hr;
594
+ }
595
+
596
+
597
virtual STDMETHODIMP OnCachePackageBegin(
598
__in_z LPCWSTR wzPackageId,
599
__in DWORD cCachePayloads,