aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Bal/stdbas
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Bal/stdbas')
-rw-r--r--src/ext/Bal/stdbas/Resources/1028/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1029/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1030/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1031/wixpreq.wxl31
-rw-r--r--src/ext/Bal/stdbas/Resources/1032/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1035/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1036/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1038/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1040/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1041/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1042/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1043/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1044/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1045/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1046/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1049/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1051/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1053/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1055/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/1060/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/2052/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/2070/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/3082/wixpreq.wxl29
-rw-r--r--src/ext/Bal/stdbas/Resources/HyperlinkLargeTheme.xml117
-rw-r--r--src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml134
-rw-r--r--src/ext/Bal/stdbas/Resources/HyperlinkTheme.wxl69
-rw-r--r--src/ext/Bal/stdbas/Resources/HyperlinkTheme.xml117
-rw-r--r--src/ext/Bal/stdbas/Resources/LoremIpsumLicense.rtfbin0 -> 4908 bytes
-rw-r--r--src/ext/Bal/stdbas/Resources/RtfLargeTheme.xml119
-rw-r--r--src/ext/Bal/stdbas/Resources/RtfTheme.wxl65
-rw-r--r--src/ext/Bal/stdbas/Resources/RtfTheme.xml117
-rw-r--r--src/ext/Bal/stdbas/Resources/dncpreq.wxl35
-rw-r--r--src/ext/Bal/stdbas/Resources/iuipreq.thm67
-rw-r--r--src/ext/Bal/stdbas/Resources/logo.pngbin0 -> 852 bytes
-rw-r--r--src/ext/Bal/stdbas/Resources/logoSide.pngbin0 -> 3477 bytes
-rw-r--r--src/ext/Bal/stdbas/Resources/wixpreq.pngbin0 -> 797 bytes
-rw-r--r--src/ext/Bal/stdbas/Resources/wixpreq.thm60
-rw-r--r--src/ext/Bal/stdbas/Resources/wixpreq.wxl38
-rw-r--r--src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp885
-rw-r--r--src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp5373
-rw-r--r--src/ext/Bal/stdbas/inc/WixInternalUIBootstrapperApplication.h7
-rw-r--r--src/ext/Bal/stdbas/inc/WixStandardBootstrapperApplication.h12
-rw-r--r--src/ext/Bal/stdbas/precomp.cpp3
-rw-r--r--src/ext/Bal/stdbas/precomp.h49
-rw-r--r--src/ext/Bal/stdbas/stdbas.manifest19
-rw-r--r--src/ext/Bal/stdbas/stdbas.mc101
-rw-r--r--src/ext/Bal/stdbas/stdbas.vcxproj79
47 files changed, 8135 insertions, 0 deletions
diff --git a/src/ext/Bal/stdbas/Resources/1028/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1028/wixpreq.wxl
new file mode 100644
index 00000000..1ab287e4
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1028/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="zh-tw" Language="1028" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] 安裝程式" />
6 <String Id="Title" Value="[WixBundleName] 安裝程式需要 Microsoft .NET Framework" />
7 <String Id="ConfirmCancelMessage" Value="您確定要取消嗎?" />
8 <String Id="HelpHeader" Value="安裝程式說明" />
9 <String Id="HelpText" Value="/passive | /quiet - 顯示最基本的 UI 但不顯示提示,或者不顯示 UI 也&#xA; 不顯示提示。預設會顯示 UI 和所有提示。&#xA;&#xA;/norestart - 隱藏任何重新啟動嘗試。根據預設,UI 會在重新啟動之前提示。&#xA;/log log.txt - 記錄至特定檔案。預設會在 %TEMP% 建立記錄檔。" />
10 <String Id="HelpCloseButton" Value="關閉(&amp;C)" />
11 <String Id="InstallLicenseTerms" Value="請按一下 「接受並安裝」5D; 按鈕,接受 Microsoft .NET Framework &lt;a href=&quot;#&quot;&gt;授權合約&lt;/a&gt;。" />
12 <String Id="InstallAcceptAndInstallButton" Value="接受並安裝(&amp;A)" />
13 <String Id="InstallDeclineButton" Value="拒絕(&amp;D)" />
14 <String Id="ProgressHeader" Value="安裝進度" />
15 <String Id="ProgressLabel" Value="正在處理:" />
16 <String Id="ProgressCancelButton" Value="取消(&amp;)" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="安裝失敗" />
22 <String Id="FailureLogLinkText" Value="一或多個問題導致安裝失敗。請修正這些問題,然後再重試安裝。如需詳細資訊,請查看&lt;a href=&quot;#&quot;&gt;記錄檔&lt;/a&gt;。" />
23 <String Id="FailureRestartText" Value="必須重新啟動電腦,才能完成軟體的復原。" />
24 <String Id="FailureRestartButton" Value="重新啟動(&amp;R)" />
25 <String Id="FailureCloseButton" Value="關閉(&amp;C)" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1029/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1029/wixpreq.wxl
new file mode 100644
index 00000000..e60c92cb
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1029/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="cs-cz" Language="1029" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="Instalace produktu [WixBundleName]" />
6 <String Id="Title" Value="Pro instalaci produktu [WixBundleName] je vyžadováno rozhraní Microsoft .NET Framework." />
7 <String Id="ConfirmCancelMessage" Value="Opravdu chcete akci zrušit?" />
8 <String Id="HelpHeader" Value="Nápověda k instalaci" />
9 <String Id="HelpText" Value="/passive | /quiet - Zobrazí minimální uživatelské rozhraní bez jakýchkoli&#xA; výzev, nebo nezobrazí žádné uživatelské rozhraní ani žádné výzvy. Ve výchozím&#xA; nastavení se jak uživatelské rozhraní, tak i všechny výzvy zobrazují.&#xA;&#xA;/norestart - Potlačí jakékoli pokusy o restartování. Ve výchozím nastavení&#xA; se v uživatelském rozhraní před restartováním zobrazí výzva.&#xA;/log log.txt - Nastaví, že se má zapisovat do konkrétního souboru protokolu.&#xA; Ve výchozím nastavení je soubor protokolu vytvořen v umístění %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Zavřít" />
11 <String Id="InstallLicenseTerms" Value="Kliknutím na tlačítko Přijmout a nainstalovat přijmete &lt;a href=&quot;#&quot;&gt;licenční podmínky&lt;/a&gt; rozhraní Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Přijmout a instalovat" />
13 <String Id="InstallDeclineButton" Value="&amp;Odmítnout" />
14 <String Id="ProgressHeader" Value="Průběh instalace" />
15 <String Id="ProgressLabel" Value="Probíhá zpracování:" />
16 <String Id="ProgressCancelButton" Value="&amp;Storno" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Instalace se nezdařila" />
22 <String Id="FailureLogLinkText" Value="Byly zjištěny problémy, kvůli kterým se instalaci nepodařilo dokončit. Odstraňte tyto problémy a potom instalaci opakujte. Další informace naleznete v &lt;a href=&quot;#&quot;&gt;souboru protokolu&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Aby bylo možné zrušení instalace softwaru dokončit, je nutné počítač restartovat." />
24 <String Id="FailureRestartButton" Value="&amp;Restartovat" />
25 <String Id="FailureCloseButton" Value="&amp;Zavřít" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1030/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1030/wixpreq.wxl
new file mode 100644
index 00000000..b895bb76
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1030/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="da-dk" Language="1030" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="Installation af [WixBundleName]" />
6 <String Id="Title" Value="Microsoft .NET Framework skal være installeret i forbindelse med Installationen af [WixBundleName]" />
7 <String Id="ConfirmCancelMessage" Value="Er du sikker på, at du vil annullere?" />
8 <String Id="HelpHeader" Value="Hjælp til installation" />
9 <String Id="HelpText" Value="/passive | /quiet - viser en minimal brugergrænseflade uden prompter eller&#xA; viser ingen brugergrænseflade og ingen prompter.&#xA; Brugergrænsefladen og alle prompter vises som standard.&#xA;&#xA;/norestart - skjuler forsøg på genstart. Der vises som standard en&#xA; forespørgsel i brugergrænsefladen, før der genstartes.&#xA;/log log.txt - logfører til en bestemt fil. Der oprettes som standard en&#xA; logfil i %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Luk" />
11 <String Id="InstallLicenseTerms" Value="Klik på knappen &quot;Acceptér og installér&quot; for at acceptere &lt;a href=&quot;#&quot;&gt;licensvilkårene&lt;/a&gt; for Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Acceptér og installér" />
13 <String Id="InstallDeclineButton" Value="&amp;Afvis" />
14 <String Id="ProgressHeader" Value="Status for installation" />
15 <String Id="ProgressLabel" Value="Behandler:" />
16 <String Id="ProgressCancelButton" Value="&amp;Annuller" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Installationen blev ikke gennemført" />
22 <String Id="FailureLogLinkText" Value="Installationen blev ikke gennemført på grund af et eller flere problemer. Løs problemerne, og prøv derefter at installere igen. Se &lt;a href=&quot;#&quot;&gt;logfilen&lt;/a&gt; for at få flere oplysninger." />
23 <String Id="FailureRestartText" Value="Du skal genstarte computeren for at fuldføre annulleringen af opdateringen af softwaren." />
24 <String Id="FailureRestartButton" Value="&amp;Genstart" />
25 <String Id="FailureCloseButton" Value="&amp;Luk" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1031/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1031/wixpreq.wxl
new file mode 100644
index 00000000..760b1ceb
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1031/wixpreq.wxl
@@ -0,0 +1,31 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="de-de" Language="1031" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <UI Control="InstallButton" Width="180" />
6
7 <String Id="Caption" Value="[WixBundleName]-Setup" />
8 <String Id="Title" Value="Für das [WixBundleName]-Setup ist Microsoft .NET Framework erforderlich." />
9 <String Id="ConfirmCancelMessage" Value="Sind Sie sicher, dass Sie den Vorgang abbrechen möchten?" />
10 <String Id="HelpHeader" Value="Setup-Hilfe" />
11 <String Id="HelpText" Value="/passive | /quiet - zeigt eine minimale Benutzeroberfläche ohne&#xA; Eingabeaufforderungen oder keine Benutzeroberfläche und keine&#xA; Eingabeaufforderungen an. Standardmäßig werden die Benutzeroberfläche und&#xA; alle Eingabeaufforderungen angezeigt.&#xA;&#xA;/norestart - unterdrückt alle Neustartversuche. Standardmäßig fordert die&#xA; Benutzeroberfläche zum Bestätigen eines Neustarts auf.&#xA;/log log.txt - erstellt das Protokoll in einer bestimmten Datei.&#xA; Standardmäßig wird die Protokolldatei in &quot;%TEMP%&quot; erstellt." />
12 <String Id="HelpCloseButton" Value="&amp;Schließen" />
13 <String Id="InstallLicenseTerms" Value="Klicken Sie auf die Schaltfläche &quot;Akzeptieren und installieren&quot;, um den Microsoft .NET Framework &lt;a href=&quot;#&quot;&gt;-Lizenzbedingungen&lt;/a&gt; zuzustimmen." />
14 <String Id="InstallAcceptAndInstallButton" Value="&amp;Akzeptieren und installieren" />
15 <String Id="InstallDeclineButton" Value="&amp;Ablehnen" />
16 <String Id="ProgressHeader" Value="Setup-Status" />
17 <String Id="ProgressLabel" Value="Verarbeitung:" />
18 <String Id="ProgressCancelButton" Value="&amp;Abbrechen" />
19 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
20 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
21 <String Id="SuccessRestartButton" Value="&amp;Restart" />
22 <String Id="SuccessCloseButton" Value="&amp;Close" />
23 <String Id="FailureHeader" Value="Setup-Fehler" />
24 <String Id="FailureLogLinkText" Value="Beim Setup ist aufgrund mindestens eines Problems ein Fehler aufgetreten. Beheben Sie die Probleme, und wiederholen Sie das Setup. Weitere Informationen finden Sie in der &lt;a href=&quot;#&quot;&gt;Protokolldatei&lt;/a&gt;." />
25 <String Id="FailureRestartText" Value="Sie müssen den Computer neu starten, um das Zurücksetzen der Software abzuschließen." />
26 <String Id="FailureRestartButton" Value="&amp;Neu starten" />
27 <String Id="FailureCloseButton" Value="&amp;Schließen" />
28 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
29 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
30 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
31</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1032/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1032/wixpreq.wxl
new file mode 100644
index 00000000..a9cd7a5b
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1032/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="el-gr" Language="1032" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="Εγκατάσταση του [WixBundleName]" />
6 <String Id="Title" Value="Για την εγκατάσταση του [WixBundleName] απαιτείται το Microsoft .NET Framework" />
7 <String Id="ConfirmCancelMessage" Value="Είστε βέβαιοι ότι θέλετε να γίνει ακύρωση;" />
8 <String Id="HelpHeader" Value="Βοήθεια για την εγκατάσταση" />
9 <String Id="HelpText" Value="/passive | /quiet - εμφανίζει ελάχιστο περιεχόμενο του περιβάλλοντος εργασίας&#xA; χρήστη χωρίς μηνύματα ή δεν εμφανίζει περιβάλλον εργασίας χρήστη και&#xA; μηνύματα. Από προεπιλογή, εμφανίζονται όλα τα μηνύματα και το περιβάλλον&#xA; εργασίας χρήστη.&#xA;&#xA;/norestart - αποκρύπτει οποιεσδήποτε προσπάθειες για επανεκκίνηση. Από&#xA; προεπιλογή, το περιβάλλον εργασίας χρήστη θα εμφανίσει μήνυμα πριν από την&#xA; επανεκκίνηση.&#xA;/log log.txt - πραγματοποιεί καταγραφή σε ένα συγκεκριμένο αρχείο. Από&#xA; προεπιλογή, δημιουργείται ένα αρχείο καταγραφής στο %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Κλείσιμο" />
11 <String Id="InstallLicenseTerms" Value="Κάντε κλικ στο κουμπί &quot;Αποδοχή και εγκατάσταση&quot; για να αποδεχτείτε τους &lt;a href=&quot;#&quot;&gt;όρους της άδειας χρήσης&lt;/a&gt; του Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Αποδοχή και εγκατάσταση" />
13 <String Id="InstallDeclineButton" Value="&amp;Απόρριψη" />
14 <String Id="ProgressHeader" Value="Πρόοδος εγκατάστασης" />
15 <String Id="ProgressLabel" Value="Επεξεργασία:" />
16 <String Id="ProgressCancelButton" Value="&amp;Άκυρο" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Αποτυχία εγκατάστασης" />
22 <String Id="FailureLogLinkText" Value="Ένα ή περισσότερα προβλήματα προκάλεσαν την αποτυχία της εγκατάστασης. Διορθώστε τα προβλήματα και μετά επαναλάβετε την εγκατάσταση. Για περισσότερες πληροφορίες, ανατρέξτε στο &lt;a href=&quot;#&quot;&gt;αρχείο καταγραφής&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Για να ολοκληρωθεί η επαναφορά του λογισμικού, πρέπει να κάνετε επανεκκίνηση του υπολογιστή." />
24 <String Id="FailureRestartButton" Value="&amp;Επανεκκίνηση" />
25 <String Id="FailureCloseButton" Value="&amp;Κλείσιμο" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1035/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1035/wixpreq.wxl
new file mode 100644
index 00000000..b54476bd
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1035/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="fi-fi" Language="1035" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] -asennus" />
6 <String Id="Title" Value="Microsoft .NET Framework tarvitaan [WixBundleName] -asennusta varten" />
7 <String Id="ConfirmCancelMessage" Value="Haluatko varmasti peruuttaa?" />
8 <String Id="HelpHeader" Value="Asennusohjelman ohje" />
9 <String Id="HelpText" Value="/passive | /quiet - näyttää mahdollisimman vähän käyttöliittymästä; ei&#xA; kehotteita tai ei käyttöliittymää ja kehotteita. Oletusarvoisesti&#xA; käyttöliittymä ja kaikki kehotteet näytetään.&#xA;&#xA;/norestart - estää uudelleenkäynnistysyritykset. Oletusarvoisesti&#xA; käyttöliittymä kysyy ennen uudelleenkäynnistystä.&#xA;/log loki.txt - kirjaa lokitiedot erityiseen tiedostoon. Oletusarvoisesti&#xA; lokitiedosto luodaan %TEMP%-kansioon." />
10 <String Id="HelpCloseButton" Value="&amp;Sulje" />
11 <String Id="InstallLicenseTerms" Value="Hyväksy Microsoft .NET Framework -ohjelman &lt;a href=&quot;#&quot;&gt;käyttöoikeusehdot&lt;/a&gt; valitsemalla Hyväksy ja asenna." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Hyväksy ja asenna" />
13 <String Id="InstallDeclineButton" Value="&amp;Hylkää" />
14 <String Id="ProgressHeader" Value="Asennuksen edistyminen" />
15 <String Id="ProgressLabel" Value="Käsitellään:" />
16 <String Id="ProgressCancelButton" Value="&amp;Peruuta" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Asennus epäonnistui" />
22 <String Id="FailureLogLinkText" Value="Asennus epäonnistui yhdestä tai useammasta syystä. Korjaa ongelmat ja yritä suorittaa asennus sitten uudelleen. Lisätietoja on &lt;a href=&quot;#&quot;&gt;lokitiedostossa&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Tietokone täytyy käynnistää uudelleen ohjelmiston palautuksen viimeistelemiseksi." />
24 <String Id="FailureRestartButton" Value="&amp;Käynnistä uudelleen" />
25 <String Id="FailureCloseButton" Value="&amp;Sulje" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1036/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1036/wixpreq.wxl
new file mode 100644
index 00000000..cd17ae34
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1036/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="fr-fr" Language="1036" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="Installation de [WixBundleName]" />
6 <String Id="Title" Value="Microsoft .NET Framework requis pour l'installation de [WixBundleName]" />
7 <String Id="ConfirmCancelMessage" Value="Êtes-vous sûr de vouloir annuler ?" />
8 <String Id="HelpHeader" Value="Aide de l'installation" />
9 <String Id="HelpText" Value="/passive | /quiet - affiche une interface minimale sans invites ou n'affiche&#xA; aucune interface ni aucune invite. Par défaut, l'interface et toutes les&#xA; invites sont affichées.&#xA;&#xA;/norestart - annule toute tentative de redémarrage. Par défaut, l'interface&#xA; affiche une invite avant de redémarrer.&#xA;/log journal.txt - consigne les entrées de journal dans un fichier spécifique.&#xA; Par défaut, un fichier journal est créé dans %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Fermer" />
11 <String Id="InstallLicenseTerms" Value="Cliquez sur le bouton « Accepter et installer » pour accepter les &lt;a href=&quot;#&quot;&gt;termes du contrat de licence&lt;/a&gt; Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Accepter et installer" />
13 <String Id="InstallDeclineButton" Value="&amp;Refuser" />
14 <String Id="ProgressHeader" Value="Progression de l'installation" />
15 <String Id="ProgressLabel" Value="Traitement en cours :" />
16 <String Id="ProgressCancelButton" Value="&amp;Annuler" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="L'installation a échoué" />
22 <String Id="FailureLogLinkText" Value="L'installation a échoué pour une ou plusieurs raisons. Corrigez les problèmes et recommencez l'installation. Pour plus d'informations, consultez le &lt;a href=&quot;#&quot;&gt;fichier journal&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Vous devez redémarrer votre ordinateur pour effectuer la restauration du logiciel." />
24 <String Id="FailureRestartButton" Value="&amp;Redémarrer" />
25 <String Id="FailureCloseButton" Value="&amp;Fermer" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1038/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1038/wixpreq.wxl
new file mode 100644
index 00000000..6cbb1d34
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1038/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="hu-hu" Language="1038" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] telepítő" />
6 <String Id="Title" Value="A(z) [WixBundleName] telepítéséhez Microsoft .NET-keretrendszer szükséges" />
7 <String Id="ConfirmCancelMessage" Value="Biztosan megszakítja?" />
8 <String Id="HelpHeader" Value="A telepítő súgója" />
9 <String Id="HelpText" Value="/passive | /quiet - Minimális felhasználói felület megjelenítése kérdések&#xA; nélkül, illetve felhasználói felület és kérdések megjelenítése nélküli&#xA; telepítés. Alapesetben a felhasználói felület és minden kérdés megjelenik.&#xA;&#xA;/norestart - Az újraindítási kérések elrejtése. Alapesetben a felhasználói&#xA; felületen megjelennek az újraindítási kérések.&#xA;/log naplo.txt - Naplózás a megadott fájlba. Alapesetben a naplófájl a %TEMP%&#xA; könyvtárban jön létre." />
10 <String Id="HelpCloseButton" Value="&amp;Bezárás" />
11 <String Id="InstallLicenseTerms" Value="A Microsoft .NET-keretrendszer &lt;a href=&quot;#&quot;&gt;licencszerződésének&lt;/a&gt; elfogadásához kattintson az „Elfogadás és telepítés” gombra." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Elfogadás és telepítés" />
13 <String Id="InstallDeclineButton" Value="&amp;Elutasítás" />
14 <String Id="ProgressHeader" Value="Telepítési folyamat" />
15 <String Id="ProgressLabel" Value="Feldolgozás:" />
16 <String Id="ProgressCancelButton" Value="&amp;Mégse" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="A telepítés nem sikerült" />
22 <String Id="FailureLogLinkText" Value="Legalább egy olyan hiba lépett fel, amely a telepítés meghiúsulását okozta. Hárítsa el a hibákat, majd futtassa újra a telepítőt. További információt a &lt;a href=&quot;#&quot;&gt;naplófájlban &lt;/a&gt; talál." />
23 <String Id="FailureRestartText" Value="A szoftver visszaállításának befejezéséhez újra kell indítania a számítógépet." />
24 <String Id="FailureRestartButton" Value="&amp;Újraindítás" />
25 <String Id="FailureCloseButton" Value="&amp;Bezárás" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1040/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1040/wixpreq.wxl
new file mode 100644
index 00000000..66940e85
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1040/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="it-it" Language="1040" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="Installazione di [WixBundleName]" />
6 <String Id="Title" Value="Microsoft .NET Framework necessario per l'installazione di [WixBundleName]" />
7 <String Id="ConfirmCancelMessage" Value="Annullare?" />
8 <String Id="HelpHeader" Value="Guida dell'installazione" />
9 <String Id="HelpText" Value="/passive | /quiet - visualizza l'interfaccia utente minima senza istruzioni&#xA; oppure non visualizza né l'interfaccia utente né le istruzioni. Per&#xA; impostazione predefinita vengono visualizzate interfaccia utente e&#xA; istruzioni.&#xA;&#xA;/norestart - elimina eventuali tentativi di riavvio. Per impostazione&#xA; predefinita l'interfaccia utente chiede istruzioni prima del riavvio.&#xA;/log log.txt - registra in un file specifico. Per impostazione predefinita un&#xA; file di log viene creato in %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Chiudi" />
11 <String Id="InstallLicenseTerms" Value="Fare clic sul pulsante &quot;Accetta e installa&quot; per accettare le &lt;a href=&quot;#&quot;&gt;condizioni di licenza&lt;/a&gt; di Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Accetta e installa" />
13 <String Id="InstallDeclineButton" Value="&amp;Rifiuta" />
14 <String Id="ProgressHeader" Value="Stato installazione" />
15 <String Id="ProgressLabel" Value="Elaborazione in corso:" />
16 <String Id="ProgressCancelButton" Value="&amp;Annulla" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Installazione non riuscita" />
22 <String Id="FailureLogLinkText" Value="L'installazione non è riuscita a causa di uno o più problemi. Risolvere i problemi e provare di nuovo l'installazione. Per ulteriori informazioni vedere il &lt;a href=&quot;#&quot;&gt;file di log&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="È necessario riavviare il computer per completare il rollback del software." />
24 <String Id="FailureRestartButton" Value="&amp;Riavvia" />
25 <String Id="FailureCloseButton" Value="&amp;Chiudi" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1041/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1041/wixpreq.wxl
new file mode 100644
index 00000000..c830072e
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1041/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="ja-jp" Language="1041" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] セットアップ" />
6 <String Id="Title" Value="[WixBundleName] セットアップには Microsoft .NET Framework が必要です" />
7 <String Id="ConfirmCancelMessage" Value="取り消しますか?" />
8 <String Id="HelpHeader" Value="セットアップのヘルプ" />
9 <String Id="HelpText" Value="/passive | /quiet - 最小の UI だけを表示してプロンプトは表示しないか、UI&#xA; もプロンプトも表示しません。 既定では、UI とすべてのプロンプトが表示されます。&#xA;&#xA;/norestart - 再起動の試みをすべて抑制します。既定では、再起動の前に UI によりプロンプトが表示されます。&#xA;/log log.txt - 特定のファイルにログを記録します。既定では、%TEMP% にログ ファイルが作成されます。" />
10 <String Id="HelpCloseButton" Value="閉じる(&amp;C)" />
11 <String Id="InstallLicenseTerms" Value="Microsoft .NET Framework の&lt;a href=&quot;#&quot;&gt;ライセンス条項&lt;/a&gt;に同意する場合は、[同意してインストール]5D; ボタンをクリックします。" />
12 <String Id="InstallAcceptAndInstallButton" Value="同意してインストール(&amp;A)" />
13 <String Id="InstallDeclineButton" Value="同意しない(&amp;)" />
14 <String Id="ProgressHeader" Value="セットアップの進行状況" />
15 <String Id="ProgressLabel" Value="処理中:" />
16 <String Id="ProgressCancelButton" Value="キャンセル(&amp;C)" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="セットアップに失敗しました" />
22 <String Id="FailureLogLinkText" Value="1 つ以上の問題が原因でセットアップに失敗しました。問題を解決してからセットアップをやり直してください。詳細については、&lt;a href=&quot;#&quot;&gt;ログ ファイル&lt;/a&gt;を参照してください。" />
23 <String Id="FailureRestartText" Value="ソフトウェアのロールバックを完了するには、コンピューターを再起動する必要があります。" />
24 <String Id="FailureRestartButton" Value="再起動(&amp;R)" />
25 <String Id="FailureCloseButton" Value="閉じる(&amp;C)" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1042/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1042/wixpreq.wxl
new file mode 100644
index 00000000..df6e9b31
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1042/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="ko-kr" Language="1042" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] 설치" />
6 <String Id="Title" Value="[WixBundleName] 설치에 필요한 Microsoft .NET Framework" />
7 <String Id="ConfirmCancelMessage" Value="취소하시겠습니까?" />
8 <String Id="HelpHeader" Value="설치 도움말" />
9 <String Id="HelpText" Value="/passive | /quiet - 메시지 없이 최소 UI를 표시하거나 UI와 메시지를 전혀&#xA; 표시하지 않습니다. 기본적으로 UI 및 모든 메시지는 표시됩니다.&#xA;&#xA;/norestart - 다시 시작하려는 시도를 무시합니다. 기본적으로 UI는 다시 시작하기 전에 메시지를 표시합니다.&#xA;/log log.txt - 특정 파일에 기록합니다. 기본적으로 로그 파일이 %TEMP%에 생성됩니다." />
10 <String Id="HelpCloseButton" Value="닫기(&amp;C)" />
11 <String Id="InstallLicenseTerms" Value="Microsoft .NET Framework &lt;a href=&quot;#&quot;&gt;사용 조건&lt;/a&gt;에 동의하려면 &quot;동의 및 설치&quot;를 클릭하십시오." />
12 <String Id="InstallAcceptAndInstallButton" Value="동의 및 설치(&amp;A)" />
13 <String Id="InstallDeclineButton" Value="동의 안 함(&amp;D)" />
14 <String Id="ProgressHeader" Value="설치 진행률" />
15 <String Id="ProgressLabel" Value="처리 중:" />
16 <String Id="ProgressCancelButton" Value="취소(&amp;C)" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="설치 실패" />
22 <String Id="FailureLogLinkText" Value="하나 이상의 문제로 인해 설치에 실패했습니다. 문제를 수정하고 설치를 다시 시도하십시오. 자세한 내용은 &lt;a href=&quot;#&quot;&gt;로그 파일&lt;/a&gt;을 참조하십시오." />
23 <String Id="FailureRestartText" Value="소프트웨어의 롤백을 완료하려면 컴퓨터를 다시 시작해야 합니다." />
24 <String Id="FailureRestartButton" Value="다시 시작(&amp;R)" />
25 <String Id="FailureCloseButton" Value="닫기(&amp;C)" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1043/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1043/wixpreq.wxl
new file mode 100644
index 00000000..c9d7b8e4
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1043/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="nl-nl" Language="1043" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] Installatie" />
6 <String Id="Title" Value="Microsoft .NET Framework is vereist voor installatie [WixBundleName]" />
7 <String Id="ConfirmCancelMessage" Value="Weet u zeker dat u de installatie wilt annuleren?" />
8 <String Id="HelpHeader" Value="Help bij Setup" />
9 <String Id="HelpText" Value="/passive | /quiet - geeft een minimale gebruikersinterface weer zonder prompts&#xA; of geeft geen gebruikersinterface en geen prompts weer. Gebruikersinterface&#xA; en alle prompts worden standaard weergegeven.&#xA;&#xA;/norestart - pogingen tot opnieuw opstarten onderdrukken.&#xA; Gebruikersinterface vraagt standaard alvorens opnieuw op te starten.&#xA;/log log.txt - registreert gegevens in een specifiek bestand. Een logbestand&#xA; wordt standaard in %TEMP% gemaakt." />
10 <String Id="HelpCloseButton" Value="&amp;Sluiten" />
11 <String Id="InstallLicenseTerms" Value="Klik op de knop 'Accepteren en installeren' om de &lt;a href=&quot;#&quot;&gt;licentievoorwaarden&lt;/a&gt; van het Microsoft .NET Framework te accepteren." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Accepteren en installeren" />
13 <String Id="InstallDeclineButton" Value="&amp;Weigeren" />
14 <String Id="ProgressHeader" Value="Voortgang van de installatie" />
15 <String Id="ProgressLabel" Value="Verwerken:" />
16 <String Id="ProgressCancelButton" Value="&amp;Annuleren" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Installatie mislukt" />
22 <String Id="FailureLogLinkText" Value="Er zijn een of meer fouten opgetreden waardoor de installatie is mislukt. Corrigeer de problemen en voer Setup opnieuw uit. Raadpleeg het &lt;a href=&quot;#&quot;&gt;log boekbestand&lt;/a&gt; voor meer informatie." />
23 <String Id="FailureRestartText" Value="U moet uw computer opnieuw opstarten om het terugdraaien van de software te voltooien." />
24 <String Id="FailureRestartButton" Value="&amp;Opnieuw opstarten" />
25 <String Id="FailureCloseButton" Value="&amp;Sluiten" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1044/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1044/wixpreq.wxl
new file mode 100644
index 00000000..9a5f8ea1
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1044/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="nb-no" Language="1044" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] Installasjonsprogram" />
6 <String Id="Title" Value="Microsoft .NET Framework kreves for [WixBundleName]-installasjon" />
7 <String Id="ConfirmCancelMessage" Value="Er du sikker på at du vil avbryte?" />
8 <String Id="HelpHeader" Value="Installasjonshjelp" />
9 <String Id="HelpText" Value="/passive | /quiet - viser minimalt brukergrensesnitt uten ledetekster, eller&#xA; ikke noe brukergrensesnitt og ingen ledetekster. Som standard vises&#xA; brukergrensesnitt og alle ledetekster.&#xA;&#xA;/norestart - undertrykker alle forsøk på omstart. Som standard spør&#xA; brukergrensesnittet før omstart.&#xA;/log log.txt - skriver logg til en bestemt fil. Som standard opprettes en&#xA; loggfil i %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Lukk" />
11 <String Id="InstallLicenseTerms" Value="Klikk Godta og installer for å godta&lt;a href=&quot;#&quot;&gt;lisensvilkårene&lt;/a&gt; for Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Godta og installer" />
13 <String Id="InstallDeclineButton" Value="&amp;Avslå" />
14 <String Id="ProgressHeader" Value="Fremdrift for installasjon" />
15 <String Id="ProgressLabel" Value="Behandler:" />
16 <String Id="ProgressCancelButton" Value="&amp;Avbryt" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Installasjon mislyktes" />
22 <String Id="FailureLogLinkText" Value="Ett eller flere problemer var årsak til at installasjonen mislyktes. Løs problemene, og installer på nytt. Du finner flere opplysninger i &lt;a href=&quot;#&quot;&gt;loggfilen&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Du må starte datamaskinen på nytt for å fullføre tilbakerullingen av programvaren." />
24 <String Id="FailureRestartButton" Value="&amp;Start på nytt" />
25 <String Id="FailureCloseButton" Value="&amp;Lukk" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1045/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1045/wixpreq.wxl
new file mode 100644
index 00000000..f7d0de6a
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1045/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="pl-pl" Language="1045" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="Instalator programu [WixBundleName]" />
6 <String Id="Title" Value="Do zainstalowania programu [WixBundleName] jest wymagany program Microsoft .NET Framework" />
7 <String Id="ConfirmCancelMessage" Value="Czy na pewno chcesz anulować?" />
8 <String Id="HelpHeader" Value="Pomoc instalatora" />
9 <String Id="HelpText" Value="/passive | /quiet - wyświetla minimalny interfejs użytkownika bez monitów&#xA; lub nie wyświetla interfejsu użytkownika ani monitów. Domyślnie jest&#xA; wyświetlany interfejs użytkownika i wszystkie monity.&#xA;&#xA;/norestart - pomija wszelkie próby ponownego uruchomienia. Domyślnie&#xA; interfejs użytkownika będzie wyświetlał monit przed ponownym uruchomieniem.&#xA;/log log.txt - zapisuje wpisy dziennika do określonego pliku.&#xA; Domyślnie plik dziennika jest tworzony w folderze %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Zamknij" />
11 <String Id="InstallLicenseTerms" Value="Kliknij przycisk Zaakceptuj i zainstaluj, aby zaakceptować &lt;a href=&quot;#&quot;&gt;warunki licencji&lt;/a&gt; programu Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Zaakceptuj i zainstaluj" />
13 <String Id="InstallDeclineButton" Value="&amp;Odrzuć" />
14 <String Id="ProgressHeader" Value="Postęp instalacji" />
15 <String Id="ProgressLabel" Value="Trwa przetwarzanie:" />
16 <String Id="ProgressCancelButton" Value="&amp;Anuluj" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Instalacja nie powiodła się" />
22 <String Id="FailureLogLinkText" Value="Co najmniej jeden problem spowodował niepowodzenie instalacji. Usuń problemy, a następnie ponów próbę instalacji. Aby uzyskać więcej informacji można znaleźć w &lt;a href=&quot;#&quot;&gt;pliku dziennika&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Aby zakończyć wycofywanie oprogramowania, musisz ponownie uruchomić komputer." />
24 <String Id="FailureRestartButton" Value="&amp;Uruchom ponownie" />
25 <String Id="FailureCloseButton" Value="&amp;Zamknij" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1046/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1046/wixpreq.wxl
new file mode 100644
index 00000000..dc8d22d1
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1046/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="pt-br" Language="1046" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] Instalação" />
6 <String Id="Title" Value="Microsoft .NET Framework é necessário para instalação do [WixBundleName]" />
7 <String Id="ConfirmCancelMessage" Value="Tem certeza de que deseja cancelar?" />
8 <String Id="HelpHeader" Value="Ajuda da Instalação" />
9 <String Id="HelpText" Value="/passive | /quiet - exibe UI mínima sem avisos ou exibe sem UI e&#xA; sem avisos. Por padrão a UI e todos avisos são exibidos.&#xA;&#xA;/norestart - suprime qualquer tentativa de reinicialização. Por padrão a UI&#xA; irá solicitar antes de reiniciar.&#xA;/log log.txt - logs para um arquivo específico. Por padrão um arquivo de log é&#xA; criado em %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Fechar" />
11 <String Id="InstallLicenseTerms" Value="Clique o botão &quot;Aceitar e Instalar&quot; para aceitar os termos de licença do Microsoft .NET Framework &lt;a href=&quot;#&quot;&gt;&lt;/a&gt;." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Aceitar e Instalar" />
13 <String Id="InstallDeclineButton" Value="&amp;Recusar" />
14 <String Id="ProgressHeader" Value="Progresso da Instalação" />
15 <String Id="ProgressLabel" Value="Processando:" />
16 <String Id="ProgressCancelButton" Value="&amp;Cancelar" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Falha na Instalação" />
22 <String Id="FailureLogLinkText" Value="Um ou mais problemas causaram falha na instalação. Corrija os problemas e tente a instalação novamente. Para mais informações consulte o &lt;a href=&quot;#&quot;&gt;arquivo de log&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Você deve reiniciar o computador para completar a reversão do software." />
24 <String Id="FailureRestartButton" Value="&amp;Reiniciar" />
25 <String Id="FailureCloseButton" Value="&amp;Fechar" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1049/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1049/wixpreq.wxl
new file mode 100644
index 00000000..0614da9e
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1049/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="ru-ru" Language="1049" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="Установка [WixBundleName]" />
6 <String Id="Title" Value="Для установки [WixBundleName] требуется Microsoft .NET Framework" />
7 <String Id="ConfirmCancelMessage" Value="Вы действительно хотите отменить операцию?" />
8 <String Id="HelpHeader" Value="Справка по установке" />
9 <String Id="HelpText" Value="/passive | /quiet - отображение минимального ИП без запросов или работа без ИП &#xA; и беззапросов. По умолчанию отображаются ИП и все запросы.&#xA;&#xA;/norestart - отключение всех попыток перезагрузки. По умолчанию в ИП перед&#xA; перезагрузкой отображается запрос.&#xA;/log log.txt - запись журнала в указанный файл. По умолчанию файл журнала&#xA; создается в папке %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Закрыть" />
11 <String Id="InstallLicenseTerms" Value="Нажмите кнопку &quot;Принять и установить&quot;, чтобы принять &lt;a href=&quot;#&quot;&gt;условия лицензии&lt;/a&gt; Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Принять и установить" />
13 <String Id="InstallDeclineButton" Value="&amp;Отклонить" />
14 <String Id="ProgressHeader" Value="Выполнение установки" />
15 <String Id="ProgressLabel" Value="Обработка:" />
16 <String Id="ProgressCancelButton" Value="&amp;Отмена" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Сбой установки" />
22 <String Id="FailureLogLinkText" Value="Не удалось выполнить установку из-за одной или нескольких проблем. Устраните эти проблемы, а затем снова запустите программу установки. Дополнительные сведения см. в &lt;a href=&quot;#&quot;&gt;файле журнала&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Необходимо перезагрузить компьютер, чтобы завершить откат программного обеспечения." />
24 <String Id="FailureRestartButton" Value="&amp;Перезагрузить" />
25 <String Id="FailureCloseButton" Value="&amp;Закрыть" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1051/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1051/wixpreq.wxl
new file mode 100644
index 00000000..0dd75159
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1051/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="sk-sk" Language="1051" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] – inštalácia" />
6 <String Id="Title" Value="Na inštaláciu aplikácie [WixBundleName] sa vyžaduje súčasť Microsoft .NET Framework" />
7 <String Id="ConfirmCancelMessage" Value="Naozaj chcete zrušiť operáciu?" />
8 <String Id="HelpHeader" Value="Pomocník pre inštaláciu" />
9 <String Id="HelpText" Value="/passive | /quiet – zobrazí minimálne používateľské rozhranie bez výziev alebo&#xA; nezobrazí žiadne používateľské rozhranie ani výzvy. Predvolene sa&#xA; zobrazuje používateľské rozhranie aj všetky výzvy.&#xA;&#xA;/norestart – zruší všetky pokusy o reštart. Používateľské rozhranie&#xA; predvolene zobrazí pred reštartom výzvu.&#xA;/log log.txt – urobí záznam do určeného súboru. Súbor denníka sa predvolene&#xA; vytvorí v priečinku %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Zavrieť" />
11 <String Id="InstallLicenseTerms" Value="Kliknutím na tlačidlo Súhlasiť a inštalovať vyjadrite svoj súhlas s &lt;a href=&quot;#&quot;&gt;licenčnými podmienkami&lt;/a&gt; súčasti Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Súhlasiť a inštalovať" />
13 <String Id="InstallDeclineButton" Value="&amp;Odmietnuť" />
14 <String Id="ProgressHeader" Value="Priebeh inštalácie" />
15 <String Id="ProgressLabel" Value="Spracúva sa:" />
16 <String Id="ProgressCancelButton" Value="&amp;Zrušiť" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Inštalácia zlyhala" />
22 <String Id="FailureLogLinkText" Value="Inštalácia zlyhala pre jednu alebo viac príčin. Odstráňte problémy a skúste znova spustiť inštaláciu. Ďalšie informácie nájdete v &lt;a href=&quot;#&quot;&gt;súbore denníka&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Dokončenie všetkých zmien softvéru vyžaduje reštart počítača." />
24 <String Id="FailureRestartButton" Value="&amp;Reštartovať" />
25 <String Id="FailureCloseButton" Value="&amp;Zavrieť" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1053/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1053/wixpreq.wxl
new file mode 100644
index 00000000..068f5519
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1053/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="sv-se" Language="1053" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName]-installation" />
6 <String Id="Title" Value="Microsoft .NET Framework krävs för installation av [WixBundleName]" />
7 <String Id="ConfirmCancelMessage" Value="Vill du avbryta?" />
8 <String Id="HelpHeader" Value="Installationshjälp" />
9 <String Id="HelpText" Value="/passive | /quiet - visar ett minimalt användargränssnitt utan prompter,&#xA; alternativt inget användargränssnitt och inga prompter. Som standard visas&#xA; användargränssnitt och samtliga prompter.&#xA;&#xA;/norestart - hejdar omstart. Som standard visar användargränssnittet en&#xA; prompt före omstart.&#xA;/log log.txt - skapar logg till en specifik fil. Som standard skapas loggfilen&#xA; i %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Stäng" />
11 <String Id="InstallLicenseTerms" Value="Klicka på knappen &quot;Godkänn och installera&quot; för att godkänna &lt;a href=&quot;#&quot;&gt;licensvillkoren&lt;/a&gt; för Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Godkänn och installera" />
13 <String Id="InstallDeclineButton" Value="&amp;Avbryt" />
14 <String Id="ProgressHeader" Value="Installationsförlopp" />
15 <String Id="ProgressLabel" Value="Bearbetar:" />
16 <String Id="ProgressCancelButton" Value="&amp;Avbryt" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Installationen misslyckades" />
22 <String Id="FailureLogLinkText" Value="Installationen misslyckades på grund av ett eller flera problem. Åtgärda problemen och försök igen. Se &lt;a href=&quot;#&quot;&gt;loggfilen&lt;/a&gt; för mer information." />
23 <String Id="FailureRestartText" Value="Starta om datorn för att återställa programmet." />
24 <String Id="FailureRestartButton" Value="&amp;Starta om" />
25 <String Id="FailureCloseButton" Value="&amp;Stäng" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1055/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1055/wixpreq.wxl
new file mode 100644
index 00000000..f4d98354
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1055/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="tr-tr" Language="1055" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] Kurulumu" />
6 <String Id="Title" Value="[WixBundleName] kurulumu için Microsoft .NET Framework gerekir" />
7 <String Id="ConfirmCancelMessage" Value="İptal etmek istediğinizden emin misiniz?" />
8 <String Id="HelpHeader" Value="Kurulum Yardımı" />
9 <String Id="HelpText" Value="/passive | /quiet - komut istemi olmayan olabildiğince küçük bir UI&#xA; görüntüler veya komut istemi ve UI görüntülemez. Varsayılan olarak UI&#xA; ve tüm komut istemleri görüntülenir.&#xA;&#xA;/norestart - yeniden başlatma denemelerini engeller. Varsayılan&#xA; olarak UI yeniden başlatmadan önce komut isteyecektir.&#xA;/log log.txt - belirli bir dosyayı günlük dosyası olarak kullanır.&#xA; Varsayılan olarak %TEMP% konumunda bir günlük dosyası oluşturulur." />
10 <String Id="HelpCloseButton" Value="&amp;Kapat" />
11 <String Id="InstallLicenseTerms" Value="Microsoft .NET Framework &lt;a href=&quot;#&quot;&gt;lisans şartlarını&lt;/a&gt; kabul etmek için &quot;Kabul Et ve Yükle&quot; düğmesini tıklatın." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Kabul Et ve Yükle" />
13 <String Id="InstallDeclineButton" Value="&amp;Reddet" />
14 <String Id="ProgressHeader" Value="Kurulum İlerleme Durumu" />
15 <String Id="ProgressLabel" Value="İşleniyor:" />
16 <String Id="ProgressCancelButton" Value="&amp;İptal" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Kurulum Başarısız" />
22 <String Id="FailureLogLinkText" Value="Bir veya daha fazla sorun kurulumun başarısız olmasına neden oldu. Lütfen sorunları çözün ve kurulumu yeniden deneyin. Daha fazla bilgi için &lt;a href=&quot;#&quot;&gt;günlük dosyasına&lt;/a&gt; bakın." />
23 <String Id="FailureRestartText" Value="Yazılım geri alma işlemini tamamlamak için bilgisayarınızı yeniden başlatmanız gerekir." />
24 <String Id="FailureRestartButton" Value="&amp;Yeniden Başlat" />
25 <String Id="FailureCloseButton" Value="&amp;Kapat" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/1060/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/1060/wixpreq.wxl
new file mode 100644
index 00000000..d24231db
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/1060/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="sl-si" Language="1060" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] Namestitev" />
6 <String Id="Title" Value="Microsoft .NET Framework, potreben za namestitev paketa [WixBundleName]" />
7 <String Id="ConfirmCancelMessage" Value="Ali ste prepričani, da želite preklicati?" />
8 <String Id="HelpHeader" Value="Pomoč za namestitev" />
9 <String Id="HelpText" Value="/passive | /quiet - prikaže minimalni uporabniški vmesnik brez pozivov ali ne prikaže&#xA; uporabniškega vmesnika in pozivov. Privzeto so prikazani uporabniški vmesnik in&#xA; vsi pozivi.&#xA;&#xA;/norestart - skrije vse možnosti za vnovicni zagon. Privzeto uporabniški vmesnik&#xA; prikaže poziv pred ponovnim zagonom.&#xA;/log log.txt - beleži vnose v dnevnik v doloceno datoteko. Privzeto je datoteko&#xA; ustvarjena v mapi %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Zapri" />
11 <String Id="InstallLicenseTerms" Value="Kliknite »Sprejmi in namesti« in sprejmite &lt;a href=&quot;#&quot;&gt;licenčne pogoje&lt;/a&gt; za Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Sprejmi in namesti" />
13 <String Id="InstallDeclineButton" Value="&amp;Zavrni" />
14 <String Id="ProgressHeader" Value="Potek namestitve" />
15 <String Id="ProgressLabel" Value="Obdelovanje:" />
16 <String Id="ProgressCancelButton" Value="&amp;Prekliči" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Namestitev ni uspela" />
22 <String Id="FailureLogLinkText" Value="Namestitev ni uspela zaradi ene ali več težav. Odpravite težave in ponovno zaženite namestitev. Za več informacij glejte &lt;a href=&quot;#&quot;&gt;dnevniško datoteko&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Za povrnitev prejšnjega stanja programske opreme morate ponovno zagnati računalnik." />
24 <String Id="FailureRestartButton" Value="&amp;Ponovni zagon" />
25 <String Id="FailureCloseButton" Value="&amp;Zapri" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/2052/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/2052/wixpreq.wxl
new file mode 100644
index 00000000..43ed19fe
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/2052/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="zh-ch" Language="2052" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] 安装" />
6 <String Id="Title" Value="[WixBundleName] 安装需要 Microsoft .NET Framework" />
7 <String Id="ConfirmCancelMessage" Value="是否确实要取消?" />
8 <String Id="HelpHeader" Value="安装程序帮助" />
9 <String Id="HelpText" Value="/passive | /quiet - 显示最小的 UI 且无提示,或者不显示 UI 且&#xA; 无提示。默认情况下显示 UI 和所有提示。&#xA;&#xA;/norestart - 隐藏任何重启提示。默认情况下 UI 会在重启前提示。&#xA;/log log.txt - 记录到特定文件。默认情况下在 %TEMP% 中创建日志文件。" />
10 <String Id="HelpCloseButton" Value="关闭(&amp;C)" />
11 <String Id="InstallLicenseTerms" Value="单击“接受并安装”按钮以接受 Microsoft .NET Framework &lt;a href=&quot;#&quot;&gt;许可证条款&lt;/a&gt;。" />
12 <String Id="InstallAcceptAndInstallButton" Value="接受并安装(&amp;A)" />
13 <String Id="InstallDeclineButton" Value="拒绝(&amp;D)" />
14 <String Id="ProgressHeader" Value="安装进度" />
15 <String Id="ProgressLabel" Value="正在处理:" />
16 <String Id="ProgressCancelButton" Value="取消(&amp;C)" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="安装失败" />
22 <String Id="FailureLogLinkText" Value="一个或多个问题导致安装失败。请解决问题,然后重新尝试安装。有关详情,请查看&lt;a href=&quot;#&quot;&gt;日志文件&lt;/a&gt;。" />
23 <String Id="FailureRestartText" Value="必须重启计算机才能完成软件的回滚。" />
24 <String Id="FailureRestartButton" Value="重启(&amp;R)" />
25 <String Id="FailureCloseButton" Value="关闭(&amp;C)" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/2070/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/2070/wixpreq.wxl
new file mode 100644
index 00000000..1e57ec2f
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/2070/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="pt-pt" Language="2070" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="Configuração do [WixBundleName]" />
6 <String Id="Title" Value="O Microsoft .NET Framework é necessário para a configuração do [WixBundleName]" />
7 <String Id="ConfirmCancelMessage" Value="Tem a certeza de que pretende cancelar?" />
8 <String Id="HelpHeader" Value="Ajuda da Configuração" />
9 <String Id="HelpText" Value="/passive | /quiet - apresenta IU mínima sem mensagens ou não apresenta IU nem&#xA; mensagens. Por predefinição, são apresentadas a IU e todas as mensagens.&#xA;&#xA;/norestart - suprimir qualquer tentativa de reinício. Por predefinição, a IU&#xA; avisará antes de reiniciar.&#xA;/log log.txt - regista num ficheiro específico. Por predefinição, é criado um&#xA; ficheiro de registo em %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Fechar" />
11 <String Id="InstallLicenseTerms" Value="Clique no botão &quot;Aceitar e Instalar&quot; para aceitar os &lt;a href=&quot;#&quot;&gt;termos de licenciamento&lt;/a&gt; do Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Aceitar e Instalar" />
13 <String Id="InstallDeclineButton" Value="&amp;Recusar" />
14 <String Id="ProgressHeader" Value="Progresso da Configuração" />
15 <String Id="ProgressLabel" Value="A processar:" />
16 <String Id="ProgressCancelButton" Value="&amp;Cancelar" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Falha da Configuração" />
22 <String Id="FailureLogLinkText" Value="Um ou mais problemas provocaram a falha da configuração. Corrija os problemas e repita a configuração. Para mais informações, consulte o &lt;a href=&quot;#&quot;&gt;ficheiro de registo&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Tem de reiniciar o computador para concluir a reversão do software." />
24 <String Id="FailureRestartButton" Value="&amp;Reiniciar" />
25 <String Id="FailureCloseButton" Value="&amp;Fechar" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/3082/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/3082/wixpreq.wxl
new file mode 100644
index 00000000..cd835913
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/3082/wixpreq.wxl
@@ -0,0 +1,29 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="es-es" Language="3082" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="Instalación de [WixBundleName]" />
6 <String Id="Title" Value="La instalación de [WixBundleName] requiere Microsoft .NET Framework" />
7 <String Id="ConfirmCancelMessage" Value="¿Está seguro de que desea cancelar?" />
8 <String Id="HelpHeader" Value="Ayuda del programa de instalación" />
9 <String Id="HelpText" Value="/passive | /quiet - muestra una interfaz de usuario mínima y no realiza&#xA; preguntas, o bien no muestra interfaz de usuario y no realiza preguntas.&#xA; De manera predeterminada se muestra la interfaz de usuario completa y se&#xA; realizan todas las preguntas necesarias.&#xA;&#xA;/norestart - suprime cualquier intento de reinicio. De manera predeterminada,&#xA; la interfaz de usuario preguntará si se desea reiniciar.&#xA;/log log.txt - registra los datos de instalación en un archivo específico.&#xA; De manera predeterminada se crea un archivo de registro en %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Cerrar" />
11 <String Id="InstallLicenseTerms" Value="Haga clic en el botón &quot;Aceptar e instalar&quot; para aceptar los &lt;a href=&quot;#&quot;&gt;términos de licencia&lt;/a&gt; de Microsoft .NET Framework." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Aceptar e instalar" />
13 <String Id="InstallDeclineButton" Value="&amp;Rechazar" />
14 <String Id="ProgressHeader" Value="Progreso de la instalación" />
15 <String Id="ProgressLabel" Value="Procesando:" />
16 <String Id="ProgressCancelButton" Value="&amp;Cancelar" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Error de la instalación" />
22 <String Id="FailureLogLinkText" Value="No se pudo completar la instalación a causa de uno o varios problemas. Corrija los problemas y vuelva a intentar la instalación. Para más información, vea el &lt;a href=&quot;#&quot;&gt;archivo de registro&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="Debe reiniciar el equipo para completar la reversión del software." />
24 <String Id="FailureRestartButton" Value="&amp;Reiniciar" />
25 <String Id="FailureCloseButton" Value="&amp;Cerrar" />
26 <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." />
27 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." />
28 <String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
29</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/HyperlinkLargeTheme.xml b/src/ext/Bal/stdbas/Resources/HyperlinkLargeTheme.xml
new file mode 100644
index 00000000..6e7b69ee
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/HyperlinkLargeTheme.xml
@@ -0,0 +1,117 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
6 <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7 <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
8 <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
9 <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
10
11 <Window Width="500" Height="390" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
12 <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
13 <Label X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
14
15 <Page Name="Loading">
16 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes" Visible="no" Name="CheckingForUpdatesLabel" />
17 </Page>
18 <Page Name="Help">
19 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
20 <Label X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
21 <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
22 <Text>#(loc.HelpCloseButton)</Text>
23 <CloseWindowAction />
24 </Button>
25 </Page>
26 <Page Name="Install">
27 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.InstallHeader)</Label>
28 <Label X="11" Y="121" Width="-11" Height="-129" FontId="3" DisablePrefix="yes">
29 <Text Condition="WixStdBASuppressOptionsUI">#(loc.InstallMessage)</Text>
30 <Text Condition="NOT WixStdBASuppressOptionsUI">#(loc.InstallMessageOptions)</Text>
31 </Label>
32 <Hypertext Name="EulaHyperlink" X="11" Y="-107" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
33 <Label Name="InstallVersion" X="11" Y="-73" Width="246" Height="17" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBAShowVersion">#(loc.InstallVersion)</Label>
34 <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
35 <Button Name="InstallUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
36 <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
37 <Text>#(loc.InstallOptionsButton)</Text>
38 <ChangePageAction Page="Options" />
39 </Button>
40 <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
41 <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
42 <Text>#(loc.InstallCancelButton)</Text>
43 <CloseWindowAction />
44 </Button>
45 </Page>
46 <Page Name="Options">
47 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
48 <Label X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Label>
49 <Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
50 <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="0">
51 <Text>#(loc.OptionsBrowseButton)</Text>
52 <BrowseDirectoryAction VariableName="InstallFolder" />
53 </Button>
54 <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
55 <Text>#(loc.OptionsOkButton)</Text>
56 <ChangePageAction Page="Install" />
57 </Button>
58 <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
59 <Text>#(loc.OptionsCancelButton)</Text>
60 <ChangePageAction Page="Install" Cancel="yes" />
61 </Button>
62 </Page>
63 <Page Name="Progress">
64 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
65 <Label X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
66 <Label Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
67 <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
68 <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
69 </Page>
70 <Page Name="Modify">
71 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
72 <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
73 <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
74 <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
75 <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
76 <Text>#(loc.ModifyCancelButton)</Text>
77 <CloseWindowAction />
78 </Button>
79 </Page>
80 <Page Name="Success">
81 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
82 <Text>#(loc.SuccessHeader)</Text>
83 <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
84 <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallHeader)</Text>
85 <Text Condition="WixBundleAction = 5">#(loc.SuccessInstallHeader)</Text>
86 <Text Condition="WixBundleAction = 7">#(loc.SuccessRepairHeader)</Text>
87 </Label>
88 <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
89 <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
90 <Text>#(loc.SuccessRestartText)</Text>
91 <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
92 </Label>
93 <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
94 <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
95 <Text>#(loc.SuccessCloseButton)</Text>
96 <CloseWindowAction />
97 </Button>
98 </Page>
99 <Page Name="Failure">
100 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
101 <Text>#(loc.FailureHeader)</Text>
102 <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
103 <Text Condition="WixBundleAction = 3">#(loc.FailureUninstallHeader)</Text>
104 <Text Condition="WixBundleAction = 5">#(loc.FailureInstallHeader)</Text>
105 <Text Condition="WixBundleAction = 7">#(loc.FailureRepairHeader)</Text>
106 </Label>
107 <Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
108 <Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
109 <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
110 <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
111 <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
112 <Text>#(loc.FailureCloseButton)</Text>
113 <CloseWindowAction />
114 </Button>
115 </Page>
116 </Window>
117</Theme>
diff --git a/src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml b/src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml
new file mode 100644
index 00000000..59a03ad0
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml
@@ -0,0 +1,134 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
6 <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7 <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
8 <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
9 <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
10
11 <Window Width="600" Height="450" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
12 <Page Name="Help">
13 <Label X="80" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
14 <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png"/>
15 <Label X="11" Y="80" Width="-11" Height="32" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
16 <Label X="11" Y="121" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
17 <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
18 <Text>#(loc.HelpCloseButton)</Text>
19 <CloseWindowAction />
20 </Button>
21 </Page>
22 <Page Name="Loading">
23 <Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes" Visible="no" Name="CheckingForUpdatesLabel" />
24 </Page>
25 <Page Name="Install">
26 <Label X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
27 <ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
28 <Label X="185" Y="50" Width="-11" Height="32" FontId="2" DisablePrefix="yes">#(loc.InstallHeader)</Label>
29 <Label X="185" Y="91" Width="-11" Height="64" FontId="3" DisablePrefix="yes">
30 <Text Condition="WixStdBASuppressOptionsUI">#(loc.InstallMessage)</Text>
31 <Text Condition="NOT WixStdBASuppressOptionsUI">#(loc.InstallMessageOptions)</Text>
32 </Label>
33 <Hypertext Name="EulaHyperlink" X="185" Y="-111" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
34 <Label Name="InstallVersion" X="185" Y="-81" Width="-11" Height="17" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBAShowVersion">#(loc.InstallVersion)</Label>
35 <Checkbox Name="EulaAcceptCheckbox" X="185" Y="-51" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
36 <Button Name="InstallUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
37 <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
38 <Text>#(loc.InstallOptionsButton)</Text>
39 <ChangePageAction Page="Options" />
40 </Button>
41 <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
42 <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
43 <Text>#(loc.InstallCancelButton)</Text>
44 <CloseWindowAction />
45 </Button>
46 </Page>
47 <Page Name="Options">
48 <Label X="80" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
49 <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png"/>
50 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
51 <Label X="11" Y="121" Width="-11" Height="17" FontId="3">#(loc.OptionsLocationLabel)</Label>
52 <Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
53 <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">
54 <Text>#(loc.OptionsBrowseButton)</Text>
55 <BrowseDirectoryAction VariableName="InstallFolder" />
56 </Button>
57 <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
58 <Text>#(loc.OptionsOkButton)</Text>
59 <ChangePageAction Page="Install" />
60 </Button>
61 <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
62 <Text>#(loc.OptionsCancelButton)</Text>
63 <ChangePageAction Page="Install" Cancel="yes" />
64 </Button>
65 </Page>
66 <Page Name="Progress">
67 <Label X="80" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
68 <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png"/>
69 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
70 <Label X="11" Y="141" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
71 <Label Name="OverallProgressPackageText" X="85" Y="141" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
72 <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="163" Width="-11" Height="20" />
73 <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
74 </Page>
75 <Page Name="Modify">
76 <Label X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
77 <ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
78 <Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
79 <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
80 <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
81 <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
82 <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
83 <Text>#(loc.ModifyCancelButton)</Text>
84 <CloseWindowAction />
85 </Button>
86 </Page>
87 <Page Name="Success">
88 <Label X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
89 <ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
90 <Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
91 <Text>#(loc.SuccessHeader)</Text>
92 <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
93 <Text Condition="WixBundleAction = 3">#(loc.SuccessUnsafeUninstallHeader)</Text>
94 <Text Condition="WixBundleAction = 4">#(loc.SuccessUninstallHeader)</Text>
95 <Text Condition="WixBundleAction = 5">#(loc.SuccessCacheHeader)</Text>
96 <Text Condition="WixBundleAction = 6">#(loc.SuccessInstallHeader)</Text>
97 <Text Condition="WixBundleAction = 7">#(loc.SuccessModifyHeader)</Text>
98 <Text Condition="WixBundleAction = 8">#(loc.SuccessRepairHeader)</Text>
99 </Label>
100 <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
101 <Label X="185" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
102 <Text>#(loc.SuccessRestartText)</Text>
103 <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
104 </Label>
105 <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
106 <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
107 <Text>#(loc.SuccessCloseButton)</Text>
108 <CloseWindowAction />
109 </Button>
110 </Page>
111 <Page Name="Failure">
112 <Label X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
113 <ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
114 <Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
115 <Text>#(loc.FailureHeader)</Text>
116 <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
117 <Text Condition="WixBundleAction = 3">#(loc.FailureUnsafeUninstallHeader)</Text>
118 <Text Condition="WixBundleAction = 4">#(loc.FailureUninstallHeader)</Text>
119 <Text Condition="WixBundleAction = 5">#(loc.FailureCacheHeader)</Text>
120 <Text Condition="WixBundleAction = 6">#(loc.FailureInstallHeader)</Text>
121 <Text Condition="WixBundleAction = 7">#(loc.FailureModifyHeader)</Text>
122 <Text Condition="WixBundleAction = 8">#(loc.FailureRepairHeader)</Text>
123 </Label>
124 <Hypertext Name="FailureLogFileLink" X="185" Y="121" Width="-11" Height="68" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
125 <Hypertext Name="FailureMessageText" X="185" Y="-115" Width="-11" Height="80" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
126 <Label X="185" Y="-57" Width="-11" Height="80" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
127 <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
128 <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
129 <Text>#(loc.FailureCloseButton)</Text>
130 <CloseWindowAction />
131 </Button>
132 </Page>
133 </Window>
134</Theme>
diff --git a/src/ext/Bal/stdbas/Resources/HyperlinkTheme.wxl b/src/ext/Bal/stdbas/Resources/HyperlinkTheme.wxl
new file mode 100644
index 00000000..24e7b728
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/HyperlinkTheme.wxl
@@ -0,0 +1,69 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] Setup" />
6 <String Id="Title" Value="[WixBundleName]" />
7 <String Id="CheckingForUpdatesLabel" Value="Checking for updates" />
8 <String Id="UpdateButton" Value="&amp;Update to version [WixStdBAUpdateAvailable]" />
9 <String Id="InstallHeader" Value="Welcome" />
10 <String Id="InstallMessage" Value="Setup will install [WixBundleName] on your computer. Click Install to continue or Cancel to exit." />
11 <String Id="InstallMessageOptions" Value="Setup will install [WixBundleName] on your computer. Click Install to continue, Options to set installation options, or Cancel to exit." />
12 <String Id="InstallVersion" Value="Version [WixBundleVersion]" />
13 <String Id="ConfirmCancelMessage" Value="Are you sure you want to cancel?" />
14 <String Id="ExecuteUpgradeRelatedBundleMessage" Value="Previous version" />
15 <String Id="HelpHeader" Value="Setup Help" />
16 <String Id="HelpText" Value="/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or&#xA; creates a complete local copy of the bundle in directory. Install is the default.&#xA;&#xA;/passive | /quiet - displays minimal UI with no prompts or displays no UI and&#xA; no prompts. By default UI and all prompts are displayed.&#xA;&#xA;/norestart - suppress any attempts to restart. By default UI will prompt before restart.&#xA;/log log.txt - logs to a specific file. By default a log file is created in %TEMP%." />
17 <String Id="HelpCloseButton" Value="&amp;Close" />
18 <String Id="InstallLicenseLinkText" Value="[WixBundleName] &lt;a href=&quot;#&quot;&gt;license terms&lt;/a&gt;." />
19 <String Id="InstallAcceptCheckbox" Value="I &amp;agree to the license terms and conditions" />
20 <String Id="InstallOptionsButton" Value="&amp;Options" />
21 <String Id="InstallInstallButton" Value="&amp;Install" />
22 <String Id="InstallCancelButton" Value="&amp;Cancel" />
23 <String Id="OptionsHeader" Value="Setup Options" />
24 <String Id="OptionsLocationLabel" Value="Install location:" />
25 <String Id="OptionsBrowseButton" Value="&amp;Browse" />
26 <String Id="OptionsOkButton" Value="&amp;OK" />
27 <String Id="OptionsCancelButton" Value="&amp;Cancel" />
28 <String Id="ProgressHeader" Value="Setup Progress" />
29 <String Id="ProgressLabel" Value="Processing:" />
30 <String Id="OverallProgressPackageText" Value="Initializing..." />
31 <String Id="ProgressCancelButton" Value="&amp;Cancel" />
32 <String Id="ModifyHeader" Value="Modify Setup" />
33 <String Id="ModifyRepairButton" Value="&amp;Repair" />
34 <String Id="ModifyUninstallButton" Value="&amp;Uninstall" />
35 <String Id="ModifyCancelButton" Value="&amp;Cancel" />
36 <String Id="SuccessHeader" Value="Setup Successful" />
37 <String Id="SuccessCacheHeader" Value="Cache Successfully Completed" />
38 <String Id="SuccessInstallHeader" Value="Installation Successfully Completed" />
39 <String Id="SuccessLayoutHeader" Value="Layout Successfully Completed" />
40 <String Id="SuccessModifyHeader" Value="Modify Successfully Completed" />
41 <String Id="SuccessRepairHeader" Value="Repair Successfully Completed" />
42 <String Id="SuccessUninstallHeader" Value="Uninstall Successfully Completed" />
43 <String Id="SuccessUnsafeUninstallHeader" Value="Uninstall Successfully Completed" />
44 <String Id="SuccessLaunchButton" Value="&amp;Launch" />
45 <String Id="SuccessRestartText" Value="You must restart your computer before you can use the software." />
46 <String Id="SuccessUninstallRestartText" Value="You must restart your computer to complete the removal of the software." />
47 <String Id="SuccessRestartButton" Value="&amp;Restart" />
48 <String Id="SuccessCloseButton" Value="&amp;Close" />
49 <String Id="FailureHeader" Value="Setup Failed" />
50 <String Id="FailureCacheHeader" Value="Cache Failed" />
51 <String Id="FailureInstallHeader" Value="Setup Failed" />
52 <String Id="FailureLayoutHeader" Value="Layout Failed" />
53 <String Id="FailureModifyHeader" Value="Modify Failed" />
54 <String Id="FailureRepairHeader" Value="Repair Failed" />
55 <String Id="FailureUninstallHeader" Value="Uninstall Failed" />
56 <String Id="FailureUnsafeUninstallHeader" Value="Uninstall Failed" />
57 <String Id="FailureHyperlinkLogText" Value="One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the &lt;a href=&quot;#&quot;&gt;log file&lt;/a&gt;." />
58 <String Id="FailureRestartText" Value="You must restart your computer to complete the rollback of the software." />
59 <String Id="FailureRestartButton" Value="&amp;Restart" />
60 <String Id="FailureCloseButton" Value="&amp;Close" />
61 <String Id="FilesInUseTitle" Value="Files In Use" />
62 <String Id="FilesInUseLabel" Value="The following applications are using files that need to be updated:" />
63 <String Id="FilesInUseNetfxCloseRadioButton" Value="Close the &amp;applications." />
64 <String Id="FilesInUseCloseRadioButton" Value="Close the &amp;applications and attempt to restart them." />
65 <String Id="FilesInUseDontCloseRadioButton" Value="&amp;Do not close applications. A reboot will be required." />
66 <String Id="FilesInUseRetryButton" Value="&amp;Retry" />
67 <String Id="FilesInUseIgnoreButton" Value="&amp;Ignore" />
68 <String Id="FilesInUseExitButton" Value="E&amp;xit" />
69</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/HyperlinkTheme.xml b/src/ext/Bal/stdbas/Resources/HyperlinkTheme.xml
new file mode 100644
index 00000000..c82e1b9f
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/HyperlinkTheme.xml
@@ -0,0 +1,117 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
6 <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7 <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
8 <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
9 <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
10
11 <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
12 <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
13 <Label X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
14
15 <Page Name="Help">
16 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
17 <Label X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
18 <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
19 <Text>#(loc.HelpCloseButton)</Text>
20 <CloseWindowAction />
21 </Button>
22 </Page>
23 <Page Name="Loading">
24 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes" Visible="no" Name="CheckingForUpdatesLabel" />
25 </Page>
26 <Page Name="Install">
27 <Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="51" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
28 <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
29 <Button Name="InstallUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
30 <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
31 <Text>#(loc.InstallOptionsButton)</Text>
32 <ChangePageAction Page="Options" />
33 </Button>
34 <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
35 <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
36 <Text>#(loc.InstallCancelButton)</Text>
37 <CloseWindowAction />
38 </Button>
39 </Page>
40 <Page Name="Options">
41 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
42 <Label X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Label>
43 <Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
44 <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">
45 <Text>#(loc.OptionsBrowseButton)</Text>
46 <BrowseDirectoryAction VariableName="InstallFolder" />
47 </Button>
48 <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
49 <Text>#(loc.OptionsOkButton)</Text>
50 <ChangePageAction Page="Install" />
51 </Button>
52 <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
53 <Text>#(loc.OptionsCancelButton)</Text>
54 <ChangePageAction Page="Install" Cancel="yes" />
55 </Button>
56 </Page>
57 <Page Name="Progress">
58 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
59 <Label X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
60 <Label Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
61 <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
62 <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
63 </Page>
64 <Page Name="Modify">
65 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
66 <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
67 <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
68 <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
69 <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
70 <Text>#(loc.ModifyCancelButton)</Text>
71 <CloseWindowAction />
72 </Button>
73 </Page>
74 <Page Name="Success">
75 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
76 <Text>#(loc.SuccessHeader)</Text>
77 <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
78 <Text Condition="WixBundleAction = 3">#(loc.SuccessUnsafeUninstallHeader)</Text>
79 <Text Condition="WixBundleAction = 4">#(loc.SuccessUninstallHeader)</Text>
80 <Text Condition="WixBundleAction = 5">#(loc.SuccessCacheHeader)</Text>
81 <Text Condition="WixBundleAction = 6">#(loc.SuccessInstallHeader)</Text>
82 <Text Condition="WixBundleAction = 7">#(loc.SuccessModifyHeader)</Text>
83 <Text Condition="WixBundleAction = 8">#(loc.SuccessRepairHeader)</Text>
84 </Label>
85 <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
86 <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
87 <Text>#(loc.SuccessRestartText)</Text>
88 <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
89 </Label>
90 <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
91 <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
92 <Text>#(loc.SuccessCloseButton)</Text>
93 <CloseWindowAction />
94 </Button>
95 </Page>
96 <Page Name="Failure">
97 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
98 <Text>#(loc.FailureHeader)</Text>
99 <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
100 <Text Condition="WixBundleAction = 3">#(loc.FailureUnsafeUninstallHeader)</Text>
101 <Text Condition="WixBundleAction = 4">#(loc.FailureUninstallHeader)</Text>
102 <Text Condition="WixBundleAction = 5">#(loc.FailureCacheHeader)</Text>
103 <Text Condition="WixBundleAction = 6">#(loc.FailureInstallHeader)</Text>
104 <Text Condition="WixBundleAction = 7">#(loc.FailureModifyHeader)</Text>
105 <Text Condition="WixBundleAction = 8">#(loc.FailureRepairHeader)</Text>
106 </Label>
107 <Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
108 <Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
109 <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
110 <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
111 <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
112 <Text>#(loc.FailureCloseButton)</Text>
113 <CloseWindowAction />
114 </Button>
115 </Page>
116 </Window>
117</Theme>
diff --git a/src/ext/Bal/stdbas/Resources/LoremIpsumLicense.rtf b/src/ext/Bal/stdbas/Resources/LoremIpsumLicense.rtf
new file mode 100644
index 00000000..1a183236
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/LoremIpsumLicense.rtf
Binary files differ
diff --git a/src/ext/Bal/stdbas/Resources/RtfLargeTheme.xml b/src/ext/Bal/stdbas/Resources/RtfLargeTheme.xml
new file mode 100644
index 00000000..b30fe3cd
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/RtfLargeTheme.xml
@@ -0,0 +1,119 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
6 <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7 <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
8 <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
9 <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
10
11 <Window Width="500" Height="390" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
12 <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
13 <Label X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
14
15 <Page Name="Help">
16 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
17 <Label X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
18 <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
19 <Text>#(loc.HelpCloseButton)</Text>
20 <CloseWindowAction />
21 </Button>
22 </Page>
23 <Page Name="Loading">
24 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes" Visible="no" Name="CheckingForUpdatesLabel" />
25 </Page>
26 <Page Name="Install">
27 <Label X="11" Y="80" Width="-11" Height="-70" TabStop="no" FontId="2" HexStyle="800000" DisablePrefix="yes" />
28 <Richedit Name="EulaRichedit" X="12" Y="81" Width="-12" Height="-71" TabStop="yes" FontId="0" />
29 <Label Name="InstallVersion" X="11" Y="-41" Width="210" Height="17" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBAShowVersion">#(loc.InstallVersion)</Label>
30 <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
31 <Button Name="InstallUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
32 <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
33 <Text>#(loc.InstallOptionsButton)</Text>
34 <ChangePageAction Page="Options" />
35 </Button>
36 <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
37 <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
38 <Text>#(loc.InstallCancelButton)</Text>
39 <CloseWindowAction />
40 </Button>
41 </Page>
42 <Page Name="Options">
43 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
44 <Label X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Label>
45 <Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
46 <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">
47 <Text>#(loc.OptionsBrowseButton)</Text>
48 <BrowseDirectoryAction VariableName="InstallFolder" />
49 </Button>
50 <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
51 <Text>#(loc.OptionsOkButton)</Text>
52 <ChangePageAction Page="Install" />
53 </Button>
54 <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
55 <Text>#(loc.OptionsCancelButton)</Text>
56 <ChangePageAction Page="Install" Cancel="yes" />
57 </Button>
58 </Page>
59 <Page Name="Progress">
60 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
61 <Label X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
62 <Label Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
63 <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
64 <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
65 </Page>
66 <Page Name="Modify">
67 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
68 <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
69 <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
70 <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
71 <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
72 <Text>#(loc.ModifyCancelButton)</Text>
73 <CloseWindowAction />
74 </Button>
75 </Page>
76 <Page Name="Success">
77 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
78 <Text>#(loc.SuccessHeader)</Text>
79 <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
80 <Text Condition="WixBundleAction = 3">#(loc.SuccessUnsafeUninstallHeader)</Text>
81 <Text Condition="WixBundleAction = 4">#(loc.SuccessUninstallHeader)</Text>
82 <Text Condition="WixBundleAction = 5">#(loc.SuccessCacheHeader)</Text>
83 <Text Condition="WixBundleAction = 6">#(loc.SuccessInstallHeader)</Text>
84 <Text Condition="WixBundleAction = 7">#(loc.SuccessModifyHeader)</Text>
85 <Text Condition="WixBundleAction = 8">#(loc.SuccessRepairHeader)</Text>
86 </Label>
87 <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
88 <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
89 <Text>#(loc.SuccessRestartText)</Text>
90 <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
91 </Label>
92 <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
93 <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
94 <Text>#(loc.SuccessCloseButton)</Text>
95 <CloseWindowAction />
96 </Button>
97 </Page>
98 <Page Name="Failure">
99 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
100 <Text>#(loc.FailureHeader)</Text>
101 <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
102 <Text Condition="WixBundleAction = 3">#(loc.FailureUnsafeUninstallHeader)</Text>
103 <Text Condition="WixBundleAction = 4">#(loc.FailureUninstallHeader)</Text>
104 <Text Condition="WixBundleAction = 5">#(loc.FailureCacheHeader)</Text>
105 <Text Condition="WixBundleAction = 6">#(loc.FailureInstallHeader)</Text>
106 <Text Condition="WixBundleAction = 7">#(loc.FailureModifyHeader)</Text>
107 <Text Condition="WixBundleAction = 8">#(loc.FailureRepairHeader)</Text>
108 </Label>
109 <Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
110 <Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
111 <Label Name="FailureRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Label>
112 <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
113 <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
114 <Text>#(loc.FailureCloseButton)</Text>
115 <CloseWindowAction />
116 </Button>
117 </Page>
118 </Window>
119</Theme>
diff --git a/src/ext/Bal/stdbas/Resources/RtfTheme.wxl b/src/ext/Bal/stdbas/Resources/RtfTheme.wxl
new file mode 100644
index 00000000..a827d1a9
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/RtfTheme.wxl
@@ -0,0 +1,65 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] Setup" />
6 <String Id="Title" Value="[WixBundleName]" />
7 <String Id="CheckingForUpdatesLabel" Value="Checking for updates" />
8 <String Id="UpdateButton" Value="&amp;Update to version [WixStdBAUpdateAvailable]" />
9 <String Id="InstallVersion" Value="Version [WixBundleVersion]" />
10 <String Id="ConfirmCancelMessage" Value="Are you sure you want to cancel?" />
11 <String Id="ExecuteUpgradeRelatedBundleMessage" Value="Previous version" />
12 <String Id="HelpHeader" Value="Setup Help" />
13 <String Id="HelpText" Value="/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or&#xA; creates a complete local copy of the bundle in directory. Install is the default.&#xA;&#xA;/passive | /quiet - displays minimal UI with no prompts or displays no UI and&#xA; no prompts. By default UI and all prompts are displayed.&#xA;&#xA;/norestart - suppress any attempts to restart. By default UI will prompt before restart.&#xA;/log log.txt - logs to a specific file. By default a log file is created in %TEMP%." />
14 <String Id="HelpCloseButton" Value="&amp;Close" />
15 <String Id="InstallAcceptCheckbox" Value="I &amp;agree to the license terms and conditions" />
16 <String Id="InstallOptionsButton" Value="&amp;Options" />
17 <String Id="InstallInstallButton" Value="&amp;Install" />
18 <String Id="InstallCancelButton" Value="&amp;Cancel" />
19 <String Id="OptionsHeader" Value="Setup Options" />
20 <String Id="OptionsLocationLabel" Value="Install location:" />
21 <String Id="OptionsBrowseButton" Value="&amp;Browse" />
22 <String Id="OptionsOkButton" Value="&amp;OK" />
23 <String Id="OptionsCancelButton" Value="&amp;Cancel" />
24 <String Id="ProgressHeader" Value="Setup Progress" />
25 <String Id="ProgressLabel" Value="Processing:" />
26 <String Id="OverallProgressPackageText" Value="Initializing..." />
27 <String Id="ProgressCancelButton" Value="&amp;Cancel" />
28 <String Id="ModifyHeader" Value="Modify Setup" />
29 <String Id="ModifyRepairButton" Value="&amp;Repair" />
30 <String Id="ModifyUninstallButton" Value="&amp;Uninstall" />
31 <String Id="ModifyCancelButton" Value="&amp;Cancel" />
32 <String Id="SuccessHeader" Value="Setup Successful" />
33 <String Id="SuccessCacheHeader" Value="Cache Successfully Completed" />
34 <String Id="SuccessInstallHeader" Value="Installation Successfully Completed" />
35 <String Id="SuccessLayoutHeader" Value="Layout Successfully Completed" />
36 <String Id="SuccessModifyHeader" Value="Modify Successfully Completed" />
37 <String Id="SuccessRepairHeader" Value="Repair Successfully Completed" />
38 <String Id="SuccessUninstallHeader" Value="Uninstall Successfully Completed" />
39 <String Id="SuccessUnsafeUninstallHeader" Value="Uninstall Successfully Completed" />
40 <String Id="SuccessLaunchButton" Value="&amp;Launch" />
41 <String Id="SuccessRestartText" Value="You must restart your computer before you can use the software." />
42 <String Id="SuccessUninstallRestartText" Value="You must restart your computer to complete the removal of the software." />
43 <String Id="SuccessRestartButton" Value="&amp;Restart" />
44 <String Id="SuccessCloseButton" Value="&amp;Close" />
45 <String Id="FailureHeader" Value="Setup Failed" />
46 <String Id="FailureCacheHeader" Value="Cache Failed" />
47 <String Id="FailureInstallHeader" Value="Setup Failed" />
48 <String Id="FailureLayoutHeader" Value="Layout Failed" />
49 <String Id="FailureModifyHeader" Value="Modify Failed" />
50 <String Id="FailureRepairHeader" Value="Repair Failed" />
51 <String Id="FailureUninstallHeader" Value="Uninstall Failed" />
52 <String Id="FailureUnsafeUninstallHeader" Value="Uninstall Failed" />
53 <String Id="FailureHyperlinkLogText" Value="One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the &lt;a href=&quot;#&quot;&gt;log file&lt;/a&gt;." />
54 <String Id="FailureRestartText" Value="You must restart your computer to complete the rollback of the software." />
55 <String Id="FailureRestartButton" Value="&amp;Restart" />
56 <String Id="FailureCloseButton" Value="&amp;Close" />
57 <String Id="FilesInUseTitle" Value="Files In Use" />
58 <String Id="FilesInUseLabel" Value="The following applications are using files that need to be updated:" />
59 <String Id="FilesInUseNetfxCloseRadioButton" Value="Close the &amp;applications." />
60 <String Id="FilesInUseCloseRadioButton" Value="Close the &amp;applications and attempt to restart them." />
61 <String Id="FilesInUseDontCloseRadioButton" Value="&amp;Do not close applications. A reboot will be required." />
62 <String Id="FilesInUseRetryButton" Value="&amp;Retry" />
63 <String Id="FilesInUseIgnoreButton" Value="&amp;Ignore" />
64 <String Id="FilesInUseExitButton" Value="E&amp;xit" />
65</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/RtfTheme.xml b/src/ext/Bal/stdbas/Resources/RtfTheme.xml
new file mode 100644
index 00000000..e1a486c8
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/RtfTheme.xml
@@ -0,0 +1,117 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
6 <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7 <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
8 <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
9 <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
10
11 <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
12 <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
13 <Label X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
14
15 <Page Name="Help">
16 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
17 <Label X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
18 <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
19 <Text>#(loc.HelpCloseButton)</Text>
20 <CloseWindowAction />
21 </Button>
22 </Page>
23 <Page Name="Loading">
24 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes" Visible="no" Name="CheckingForUpdatesLabel" />
25 </Page>
26 <Page Name="Install">
27 <Richedit Name="EulaRichedit" X="11" Y="80" Width="-11" Height="-70" TabStop="yes" FontId="0" HexStyle="800000" />
28 <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
29 <Button Name="InstallUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
30 <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
31 <Text>#(loc.InstallOptionsButton)</Text>
32 <ChangePageAction Page="Options" />
33 </Button>
34 <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
35 <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
36 <Text>#(loc.InstallCancelButton)</Text>
37 <CloseWindowAction />
38 </Button>
39 </Page>
40 <Page Name="Options">
41 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
42 <Label X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Label>
43 <Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
44 <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">
45 <Text>#(loc.OptionsBrowseButton)</Text>
46 <BrowseDirectoryAction VariableName="InstallFolder" />
47 </Button>
48 <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
49 <Text>#(loc.OptionsOkButton)</Text>
50 <ChangePageAction Page="Install" />
51 </Button>
52 <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
53 <Text>#(loc.OptionsCancelButton)</Text>
54 <ChangePageAction Page="Install" Cancel="yes" />
55 </Button>
56 </Page>
57 <Page Name="Progress">
58 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
59 <Label X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
60 <Label Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
61 <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
62 <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
63 </Page>
64 <Page Name="Modify">
65 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
66 <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button>
67 <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
68 <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
69 <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
70 <Text>#(loc.ModifyCancelButton)</Text>
71 <CloseWindowAction />
72 </Button>
73 </Page>
74 <Page Name="Success">
75 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
76 <Text>#(loc.SuccessHeader)</Text>
77 <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
78 <Text Condition="WixBundleAction = 3">#(loc.SuccessUnsafeUninstallHeader)</Text>
79 <Text Condition="WixBundleAction = 4">#(loc.SuccessUninstallHeader)</Text>
80 <Text Condition="WixBundleAction = 5">#(loc.SuccessCacheHeader)</Text>
81 <Text Condition="WixBundleAction = 6">#(loc.SuccessInstallHeader)</Text>
82 <Text Condition="WixBundleAction = 7">#(loc.SuccessModifyHeader)</Text>
83 <Text Condition="WixBundleAction = 8">#(loc.SuccessRepairHeader)</Text>
84 </Label>
85 <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
86 <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
87 <Text>#(loc.SuccessRestartText)</Text>
88 <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
89 </Label>
90 <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
91 <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
92 <Text>#(loc.SuccessCloseButton)</Text>
93 <CloseWindowAction />
94 </Button>
95 </Page>
96 <Page Name="Failure">
97 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
98 <Text>#(loc.FailureHeader)</Text>
99 <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
100 <Text Condition="WixBundleAction = 3">#(loc.FailureUnsafeUninstallHeader)</Text>
101 <Text Condition="WixBundleAction = 4">#(loc.FailureUninstallHeader)</Text>
102 <Text Condition="WixBundleAction = 5">#(loc.FailureCacheHeader)</Text>
103 <Text Condition="WixBundleAction = 6">#(loc.FailureInstallHeader)</Text>
104 <Text Condition="WixBundleAction = 7">#(loc.FailureModifyHeader)</Text>
105 <Text Condition="WixBundleAction = 8">#(loc.FailureRepairHeader)</Text>
106 </Label>
107 <Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
108 <Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
109 <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
110 <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
111 <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
112 <Text>#(loc.FailureCloseButton)</Text>
113 <CloseWindowAction />
114 </Button>
115 </Page>
116 </Window>
117</Theme>
diff --git a/src/ext/Bal/stdbas/Resources/dncpreq.wxl b/src/ext/Bal/stdbas/Resources/dncpreq.wxl
new file mode 100644
index 00000000..a1f63d43
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/dncpreq.wxl
@@ -0,0 +1,35 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] Setup" />
6 <String Id="Title" Value="Microsoft .NET Core required for [WixBundleName] setup" />
7 <String Id="ConfirmCancelMessage" Value="Are you sure you want to cancel?" />
8 <String Id="HelpHeader" Value="Setup Help" />
9 <String Id="HelpText" Value="/passive | /quiet - displays minimal UI with no prompts or displays no UI and&#xA; no prompts. By default UI and all prompts are displayed.&#xA;&#xA;/norestart - suppress any attempts to restart. By default UI will prompt before restart.&#xA;/log log.txt - logs to a specific file. By default a log file is created in %TEMP%." />
10 <String Id="HelpCloseButton" Value="&amp;Close" />
11 <String Id="InstallLicenseTerms" Value="Click the &quot;Accept and Install&quot; button to accept the Microsoft .NET Core &lt;a href=&quot;#&quot;&gt;license terms&lt;/a&gt;." />
12 <String Id="InstallAcceptAndInstallButton" Value="&amp;Accept and Install" />
13 <String Id="InstallDeclineButton" Value="&amp;Decline" />
14 <String Id="ProgressHeader" Value="Setup Progress" />
15 <String Id="ProgressLabel" Value="Processing:" />
16 <String Id="ProgressCancelButton" Value="&amp;Cancel" />
17 <String Id="SuccessHeader" Value="Microsoft .NET Core Setup Successful" />
18 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
19 <String Id="SuccessRestartButton" Value="&amp;Restart" />
20 <String Id="SuccessCloseButton" Value="&amp;Close" />
21 <String Id="FailureHeader" Value="Setup Failed" />
22 <String Id="FailureLogLinkText" Value="One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the &lt;a href=&quot;#&quot;&gt;log file&lt;/a&gt;." />
23 <String Id="FailureRestartText" Value="You must restart your computer to complete the rollback of the software." />
24 <String Id="FailureRestartButton" Value="&amp;Restart" />
25 <String Id="FailureCloseButton" Value="&amp;Close" />
26 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Core runtime even though all of the prerequisites are installed." />
27 <String Id="FilesInUseTitle" Value="Files In Use" />
28 <String Id="FilesInUseLabel" Value="The following applications are using files that need to be updated:" />
29 <String Id="FilesInUseNetfxCloseRadioButton" Value="Close the &amp;applications." />
30 <String Id="FilesInUseCloseRadioButton" Value="Close the &amp;applications and attempt to restart them." />
31 <String Id="FilesInUseDontCloseRadioButton" Value="&amp;Do not close applications. A reboot will be required." />
32 <String Id="FilesInUseRetryButton" Value="&amp;Retry" />
33 <String Id="FilesInUseIgnoreButton" Value="&amp;Ignore" />
34 <String Id="FilesInUseExitButton" Value="E&amp;xit" />
35</WixLocalization>
diff --git a/src/ext/Bal/stdbas/Resources/iuipreq.thm b/src/ext/Bal/stdbas/Resources/iuipreq.thm
new file mode 100644
index 00000000..83425841
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/iuipreq.thm
@@ -0,0 +1,67 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
3 <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
4 <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
5 <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
6 <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7
8 <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
9 <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="wixpreq.png" Visible="yes"/>
10 <Label X="80" Y="11" Width="-11" Height="96" FontId="1" Visible="yes" DisablePrefix="yes">
11 <Text>#(loc.Title)</Text>
12 <Text Condition="WixBundleAction = 2 OR WixBundleCommandLineAction = 1">#(loc.NonPrereqTitle)</Text>
13 </Label>
14
15 <Page Name="Help">
16 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
17 <Label X="11" Y="153" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
18 <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
19 <Text>#(loc.HelpCloseButton)</Text>
20 <CloseWindowAction />
21 </Button>
22 </Page>
23 <Page Name="Install">
24 <Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="34" TabStop="yes" FontId="3">#(loc.InstallLicenseTerms)</Hypertext>
25 <Button Name="InstallButton" X="-91" Y="-11" Width="130" Height="23" TabStop="yes" FontId="0">#(loc.InstallAcceptAndInstallButton)</Button>
26 <Button Name="InstallDeclineButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
27 <Text>#(loc.InstallDeclineButton)</Text>
28 <CloseWindowAction />
29 </Button>
30 </Page>
31 <Page Name="Progress">
32 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
33 <Label X="11" Y="153" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
34 <Label Name="OverallProgressPackageText" X="85" Y="153" Width="-11" Height="17" FontId="3" DisablePrefix="yes">[ProgressPackageName]</Label>
35 <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="175" Width="-11" Height="15" />
36 <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
37 </Page>
38 <Page Name="Success">
39 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
40 <Text>#(loc.SuccessHeader)</Text>
41 <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
42 </Label>
43 <Label X="-11" Y="-20" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
44 <Text>#(loc.SuccessRestartText)</Text>
45 </Label>
46 <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
47 <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
48 <Text>#(loc.SuccessCloseButton)</Text>
49 <CloseWindowAction />
50 </Button>
51 </Page>
52 <Page Name="Failure">
53 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
54 <Text>#(loc.FailureHeader)</Text>
55 <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
56 </Label>
57 <Hypertext Name="FailureLogFileLink" X="11" Y="153" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureLogLinkText)</Hypertext>
58 <Hypertext Name="FailureMessageText" X="22" Y="190" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes"/>
59 <Label X="-11" Y="-20" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
60 <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
61 <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
62 <Text>#(loc.FailureCloseButton)</Text>
63 <CloseWindowAction />
64 </Button>
65 </Page>
66 </Window>
67</Theme>
diff --git a/src/ext/Bal/stdbas/Resources/logo.png b/src/ext/Bal/stdbas/Resources/logo.png
new file mode 100644
index 00000000..7adc6e11
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/logo.png
Binary files differ
diff --git a/src/ext/Bal/stdbas/Resources/logoSide.png b/src/ext/Bal/stdbas/Resources/logoSide.png
new file mode 100644
index 00000000..308841c5
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/logoSide.png
Binary files differ
diff --git a/src/ext/Bal/stdbas/Resources/wixpreq.png b/src/ext/Bal/stdbas/Resources/wixpreq.png
new file mode 100644
index 00000000..c6e9527b
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/wixpreq.png
Binary files differ
diff --git a/src/ext/Bal/stdbas/Resources/wixpreq.thm b/src/ext/Bal/stdbas/Resources/wixpreq.thm
new file mode 100644
index 00000000..a49c3ee7
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/wixpreq.thm
@@ -0,0 +1,60 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
3 <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
4 <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
5 <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
6 <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7
8 <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
9 <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="wixpreq.png" Visible="yes"/>
10 <Label X="80" Y="11" Width="-11" Height="96" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
11
12 <Page Name="Help">
13 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
14 <Label X="11" Y="153" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
15 <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
16 <Text>#(loc.HelpCloseButton)</Text>
17 <CloseWindowAction />
18 </Button>
19 </Page>
20 <Page Name="Install">
21 <Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="34" TabStop="yes" FontId="3">#(loc.InstallLicenseTerms)</Hypertext>
22 <Button Name="InstallButton" X="-91" Y="-11" Width="130" Height="23" TabStop="yes" FontId="0">#(loc.InstallAcceptAndInstallButton)</Button>
23 <Button Name="InstallDeclineButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
24 <Text>#(loc.InstallDeclineButton)</Text>
25 <CloseWindowAction />
26 </Button>
27 </Page>
28 <Page Name="Progress">
29 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
30 <Label X="11" Y="153" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
31 <Label Name="OverallProgressPackageText" X="85" Y="153" Width="-11" Height="17" FontId="3" DisablePrefix="yes">[ProgressPackageName]</Label>
32 <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="175" Width="-11" Height="15" />
33 <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
34 </Page>
35 <Page Name="Success">
36 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
37 <Text>#(loc.SuccessHeader)</Text>
38 </Label>
39 <Label X="-11" Y="-20" Width="400" Height="34" FontId="3" DisablePrefix="yes">
40 <Text>#(loc.SuccessRestartText)</Text>
41 </Label>
42 <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
43 <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
44 <Text>#(loc.SuccessCloseButton)</Text>
45 <CloseWindowAction />
46 </Button>
47 </Page>
48 <Page Name="Failure">
49 <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.FailureHeader)</Label>
50 <Hypertext Name="FailureLogFileLink" X="11" Y="153" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureLogLinkText)</Hypertext>
51 <Hypertext Name="FailureMessageText" X="22" Y="190" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes"/>
52 <Label X="-11" Y="-20" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
53 <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
54 <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
55 <Text>#(loc.FailureCloseButton)</Text>
56 <CloseWindowAction />
57 </Button>
58 </Page>
59 </Window>
60</Theme>
diff --git a/src/ext/Bal/stdbas/Resources/wixpreq.wxl b/src/ext/Bal/stdbas/Resources/wixpreq.wxl
new file mode 100644
index 00000000..f4725121
--- /dev/null
+++ b/src/ext/Bal/stdbas/Resources/wixpreq.wxl
@@ -0,0 +1,38 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3
4<WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl">
5 <String Id="Caption" Value="[WixBundleName] Prerequisite Setup" />
6 <String Id="Title" Value="Prerequisite required for [WixBundleName] setup" />
7 <String Id="NonPrereqTitle" Value="[WixBundleName] setup" />
8 <String Id="ConfirmCancelMessage" Value="Are you sure you want to cancel?" />
9 <String Id="HelpHeader" Value="Setup Help" />
10 <String Id="HelpText" Value="/passive | /quiet - displays minimal UI with no prompts or displays no UI and&#xA; no prompts. By default UI and all prompts are displayed.&#xA;&#xA;/norestart - suppress any attempts to restart. By default UI will prompt before restart.&#xA;/log log.txt - logs to a specific file. By default a log file is created in %TEMP%." />
11 <String Id="HelpCloseButton" Value="&amp;Close" />
12 <String Id="InstallLicenseTerms" Value="Click the &quot;Accept and Install&quot; button to accept the prerequisite &lt;a href=&quot;#&quot;&gt;license terms&lt;/a&gt;." />
13 <String Id="InstallAcceptAndInstallButton" Value="&amp;Accept and Install" />
14 <String Id="InstallDeclineButton" Value="&amp;Decline" />
15 <String Id="ProgressHeader" Value="Setup Progress" />
16 <String Id="ProgressLabel" Value="Processing:" />
17 <String Id="ProgressCancelButton" Value="&amp;Cancel" />
18 <String Id="SuccessHeader" Value="Prerequisite Setup Successful" />
19 <String Id="SuccessLayoutHeader" Value="Layout Successfully Completed" />
20 <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." />
21 <String Id="SuccessRestartButton" Value="&amp;Restart" />
22 <String Id="SuccessCloseButton" Value="&amp;Close" />
23 <String Id="FailureHeader" Value="Setup Failed" />
24 <String Id="FailureLayoutHeader" Value="Layout Failed" />
25 <String Id="FailureLogLinkText" Value="One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the &lt;a href=&quot;#&quot;&gt;log file&lt;/a&gt;." />
26 <String Id="FailureRestartText" Value="You must restart your computer to complete the rollback of the software." />
27 <String Id="FailureRestartButton" Value="&amp;Restart" />
28 <String Id="FailureCloseButton" Value="&amp;Close" />
29 <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to start even though all of the prerequisites are installed." />
30 <String Id="FilesInUseTitle" Value="Files In Use" />
31 <String Id="FilesInUseLabel" Value="The following applications are using files that need to be updated:" />
32 <String Id="FilesInUseNetfxCloseRadioButton" Value="Close the &amp;applications." />
33 <String Id="FilesInUseCloseRadioButton" Value="Close the &amp;applications and attempt to restart them." />
34 <String Id="FilesInUseDontCloseRadioButton" Value="&amp;Do not close applications. A reboot will be required." />
35 <String Id="FilesInUseRetryButton" Value="&amp;Retry" />
36 <String Id="FilesInUseIgnoreButton" Value="&amp;Ignore" />
37 <String Id="FilesInUseExitButton" Value="E&amp;xit" />
38</WixLocalization>
diff --git a/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp
new file mode 100644
index 00000000..a8967a31
--- /dev/null
+++ b/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp
@@ -0,0 +1,885 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3#include "precomp.h"
4#include "BalBaseBootstrapperApplication.h"
5
6static const LPCWSTR WIXIUIBA_WINDOW_CLASS = L"WixInternalUIBA";
7
8enum WM_WIXIUIBA
9{
10 WM_WIXIUIBA_DETECT_PACKAGES = WM_APP + 100,
11 WM_WIXIUIBA_PLAN_PACKAGES,
12 WM_WIXIUIBA_APPLY_PACKAGES,
13 WM_WIXIUIBA_DETECT_FOR_CLEANUP,
14 WM_WIXIUIBA_PLAN_PACKAGES_FOR_CLEANUP,
15};
16
17
18class CWixInternalUIBootstrapperApplication : public CBalBaseBootstrapperApplication
19{
20public: // IBootstrapperApplication
21 STDMETHODIMP OnCreate(
22 __in IBootstrapperEngine* pEngine,
23 __in BOOTSTRAPPER_COMMAND* pCommand
24 )
25 {
26 HRESULT hr = S_OK;
27
28 hr = __super::OnCreate(pEngine, pCommand);
29 BalExitOnFailure(hr, "CBalBaseBootstrapperApplication initialization failed.");
30
31 m_commandAction = pCommand->action;
32 m_commandDisplay = pCommand->display;
33
34 hr = InitializeData();
35 BalExitOnFailure(hr, "Failed to initialize data in internal UI bootstrapper application.");
36
37 LExit:
38 return hr;
39 }
40
41 virtual STDMETHODIMP OnStartup()
42 {
43 HRESULT hr = S_OK;
44 DWORD dwUIThreadId = 0;
45
46 // create UI thread
47 m_hUiThread = ::CreateThread(NULL, 0, UiThreadProc, this, 0, &dwUIThreadId);
48 if (!m_hUiThread)
49 {
50 BalExitWithLastError(hr, "Failed to create UI thread.");
51 }
52
53 LExit:
54 return hr;
55 }
56
57
58 virtual STDMETHODIMP OnShutdown(
59 __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction
60 )
61 {
62 // wait for UI thread to terminate
63 if (m_hUiThread)
64 {
65 ::WaitForSingleObject(m_hUiThread, INFINITE);
66 ReleaseHandle(m_hUiThread);
67 }
68
69 if (m_fFailedToLoadPackage)
70 {
71 Assert(FAILED(m_hrFinal));
72 // TODO: Should we really do what this error message says? Going back to the prereq BA
73 // to show the error dialog is pretty overkill vs. showing an error dialog in this BA.
74 BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Failed to load primary package as the BA. The bootstrapper application will be reloaded to show the error.");
75 *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER;
76 }
77
78 return S_OK;
79 }
80
81
82 virtual STDMETHODIMP OnDetectPackageComplete(
83 __in_z LPCWSTR wzPackageId,
84 __in HRESULT hrStatus,
85 __in BOOTSTRAPPER_PACKAGE_STATE state,
86 __in BOOL fCached
87 )
88 {
89 BAL_INFO_PACKAGE* pPackage = NULL;
90
91 if (SUCCEEDED(hrStatus) && SUCCEEDED(BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage)) &&
92 BAL_INFO_PRIMARY_PACKAGE_TYPE_DEFAULT == pPackage->primaryPackageType)
93 {
94 BOOL fInstalled = BOOTSTRAPPER_PACKAGE_STATE_ABSENT < state;
95
96 // Maybe modify the action state if the primary package is or is not already installed.
97 if (fInstalled && BOOTSTRAPPER_ACTION_INSTALL == m_commandAction)
98 {
99 m_commandAction = BOOTSTRAPPER_ACTION_MODIFY;
100 }
101 else if (!fInstalled && (BOOTSTRAPPER_ACTION_MODIFY == m_commandAction || BOOTSTRAPPER_ACTION_REPAIR == m_commandAction))
102 {
103 m_commandAction = BOOTSTRAPPER_ACTION_INSTALL;
104 }
105
106 if (m_fApplied && !fInstalled && fCached)
107 {
108 m_fAutomaticRemoval = TRUE;
109 }
110 }
111
112 return __super::OnDetectPackageComplete(wzPackageId, hrStatus, state, fCached);
113 }
114
115
116 virtual STDMETHODIMP OnDetectComplete(
117 __in HRESULT hrStatus,
118 __in BOOL fEligibleForCleanup
119 )
120 {
121 if (m_fAutomaticRemoval && SUCCEEDED(hrStatus))
122 {
123 ::PostMessageW(m_hWnd, WM_WIXIUIBA_PLAN_PACKAGES_FOR_CLEANUP, 0, BOOTSTRAPPER_ACTION_UNINSTALL);
124 ExitFunction();
125 }
126 else if (m_fApplied)
127 {
128 ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0);
129 ExitFunction();
130 }
131
132 // If we're performing an action that modifies machine state then evaluate conditions.
133 BOOL fEvaluateConditions = SUCCEEDED(hrStatus) &&
134 (BOOTSTRAPPER_ACTION_LAYOUT < m_commandAction && BOOTSTRAPPER_ACTION_UPDATE_REPLACE > m_commandAction);
135
136 if (fEvaluateConditions)
137 {
138 hrStatus = EvaluateConditions();
139 }
140
141 if (SUCCEEDED(hrStatus))
142 {
143 ::PostMessageW(m_hWnd, WM_WIXIUIBA_PLAN_PACKAGES, 0, m_commandAction);
144 }
145 else
146 {
147 SetLoadPackageFailure(hrStatus);
148 }
149
150 LExit:
151 return __super::OnDetectComplete(hrStatus, fEligibleForCleanup);
152 }
153
154
155 virtual STDMETHODIMP OnPlanPackageBegin(
156 __in_z LPCWSTR wzPackageId,
157 __in BOOTSTRAPPER_PACKAGE_STATE state,
158 __in BOOL fCached,
159 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition,
160 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition,
161 __in BOOTSTRAPPER_REQUEST_STATE recommendedState,
162 __in BOOTSTRAPPER_CACHE_TYPE recommendedCacheType,
163 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestState,
164 __inout BOOTSTRAPPER_CACHE_TYPE* pRequestedCacheType,
165 __inout BOOL* pfCancel
166 )
167 {
168 HRESULT hr = S_OK;
169 BAL_INFO_PACKAGE* pPackage = NULL;
170
171 hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
172 if (FAILED(hr))
173 {
174 // Non-chain package, keep default.
175 }
176 else if (BAL_INFO_PRIMARY_PACKAGE_TYPE_DEFAULT != pPackage->primaryPackageType)
177 {
178 // Only the primary package should be cached or executed.
179 if (BOOTSTRAPPER_CACHE_TYPE_FORCE == *pRequestedCacheType)
180 {
181 *pRequestedCacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP;
182 }
183
184 *pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE;
185 }
186 else if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay && !m_fAutomaticRemoval)
187 {
188 // Make sure the MSI UI is shown regardless of the current state of the package.
189 *pRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_PRESENT;
190 }
191
192 return __super::OnPlanPackageBegin(wzPackageId, state, fCached, installCondition, repairCondition, recommendedState, recommendedCacheType, pRequestState, pRequestedCacheType, pfCancel);
193 }
194
195
196 virtual STDMETHODIMP OnPlanMsiPackage(
197 __in_z LPCWSTR wzPackageId,
198 __in BOOL fExecute,
199 __in BOOTSTRAPPER_ACTION_STATE action,
200 __in BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning,
201 __inout BOOL* pfCancel,
202 __inout BURN_MSI_PROPERTY* pActionMsiProperty,
203 __inout INSTALLUILEVEL* pUiLevel,
204 __inout BOOL* pfDisableExternalUiHandler,
205 __inout BOOTSTRAPPER_MSI_FILE_VERSIONING* pFileVersioning
206 )
207 {
208 INSTALLUILEVEL uiLevel = INSTALLUILEVEL_NOCHANGE;
209
210 if (m_fAutomaticRemoval)
211 {
212 ExitFunction();
213 }
214
215 switch (m_commandDisplay)
216 {
217 case BOOTSTRAPPER_DISPLAY_FULL:
218 uiLevel = INSTALLUILEVEL_FULL;
219 break;
220
221 case BOOTSTRAPPER_DISPLAY_PASSIVE:
222 uiLevel = INSTALLUILEVEL_REDUCED;
223 break;
224 }
225
226 if (INSTALLUILEVEL_NOCHANGE != uiLevel)
227 {
228 *pUiLevel = uiLevel;
229 }
230
231 *pActionMsiProperty = BURN_MSI_PROPERTY_NONE;
232 *pfDisableExternalUiHandler = TRUE;
233
234 LExit:
235 return __super::OnPlanMsiPackage(wzPackageId, fExecute, action, recommendedFileVersioning, pfCancel, pActionMsiProperty, pUiLevel, pfDisableExternalUiHandler, pFileVersioning);
236 }
237
238
239 virtual STDMETHODIMP OnPlanComplete(
240 __in HRESULT hrStatus
241 )
242 {
243 if (SUCCEEDED(hrStatus))
244 {
245 ::PostMessageW(m_hWnd, WM_WIXIUIBA_APPLY_PACKAGES, 0, 0);
246 }
247 else if (m_fAutomaticRemoval)
248 {
249 ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0);
250 }
251 else
252 {
253 SetLoadPackageFailure(hrStatus);
254 }
255
256 return __super::OnPlanComplete(hrStatus);
257 }
258
259
260 virtual STDMETHODIMP OnApplyBegin(
261 __in DWORD dwPhaseCount,
262 __inout BOOL* pfCancel
263 )
264 {
265 m_fApplying = TRUE;
266 return __super::OnApplyBegin(dwPhaseCount, pfCancel);
267 }
268
269
270 virtual STDMETHODIMP OnCacheComplete(
271 __in HRESULT hrStatus
272 )
273 {
274 if (FAILED(hrStatus) && !m_fAutomaticRemoval)
275 {
276 SetLoadPackageFailure(hrStatus);
277 }
278
279 return __super::OnCacheComplete(hrStatus);
280 }
281
282
283 virtual STDMETHODIMP OnExecuteBegin(
284 __in DWORD cExecutingPackages,
285 __in BOOL* pfCancel
286 )
287 {
288 m_pEngine->CloseSplashScreen();
289
290 return __super::OnExecuteBegin(cExecutingPackages, pfCancel);
291 }
292
293
294 virtual STDMETHODIMP OnApplyComplete(
295 __in HRESULT hrStatus,
296 __in BOOTSTRAPPER_APPLY_RESTART restart,
297 __in BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation,
298 __inout BOOTSTRAPPER_APPLYCOMPLETE_ACTION* pAction
299 )
300 {
301 HRESULT hr = __super::OnApplyComplete(hrStatus, restart, recommendation, pAction);
302
303 *pAction = BOOTSTRAPPER_APPLYCOMPLETE_ACTION_NONE;
304 m_fApplying = FALSE;
305
306 if (m_fAutomaticRemoval)
307 {
308 ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0);
309 }
310 else
311 {
312 m_restartResult = restart; // remember the restart result so we return the correct error code.
313 m_fApplied = TRUE;
314
315 if (FAILED(hrStatus))
316 {
317 m_hrFinal = hrStatus;
318 }
319
320 ::PostMessageW(m_hWnd, WM_WIXIUIBA_DETECT_FOR_CLEANUP, 0, 0);
321 }
322
323 return hr;
324 }
325
326
327private:
328 //
329 // UiThreadProc - entrypoint for UI thread.
330 //
331 static DWORD WINAPI UiThreadProc(
332 __in LPVOID pvContext
333 )
334 {
335 HRESULT hr = S_OK;
336 CWixInternalUIBootstrapperApplication* pThis = (CWixInternalUIBootstrapperApplication*)pvContext;
337 BOOL fComInitialized = FALSE;
338 BOOL fRet = FALSE;
339 MSG msg = { };
340 DWORD dwQuit = 0;
341
342 // Initialize COM.
343 hr = ::CoInitialize(NULL);
344 BalExitOnFailure(hr, "Failed to initialize COM.");
345 fComInitialized = TRUE;
346
347 // Create main window.
348 hr = pThis->CreateMainWindow();
349 BalExitOnFailure(hr, "Failed to create internal UI bootstrapper application main window.");
350
351 ::PostMessageW(pThis->m_hWnd, WM_WIXIUIBA_DETECT_PACKAGES, 0, 0);
352
353 // message pump
354 while (0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0)))
355 {
356 if (-1 == fRet)
357 {
358 hr = E_UNEXPECTED;
359 BalExitOnFailure(hr, "Unexpected return value from message pump.");
360 }
361 else if (!::IsDialogMessageW(pThis->m_hWnd, &msg))
362 {
363 ::TranslateMessage(&msg);
364 ::DispatchMessageW(&msg);
365 }
366 }
367
368 // Succeeded thus far, check to see if anything went wrong while actually
369 // executing changes.
370 if (FAILED(pThis->m_hrFinal))
371 {
372 hr = pThis->m_hrFinal;
373 }
374 else if (pThis->CheckCanceled())
375 {
376 hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
377 }
378
379 LExit:
380 // destroy main window
381 pThis->DestroyMainWindow();
382
383 if (BOOTSTRAPPER_APPLY_RESTART_INITIATED == pThis->m_restartResult)
384 {
385 dwQuit = SUCCEEDED(hr) ? ERROR_SUCCESS_REBOOT_INITIATED : ERROR_FAIL_REBOOT_INITIATED;
386 }
387 else if (BOOTSTRAPPER_APPLY_RESTART_REQUIRED == pThis->m_restartResult)
388 {
389 dwQuit = SUCCEEDED(hr) ? ERROR_SUCCESS_REBOOT_REQUIRED : ERROR_FAIL_REBOOT_REQUIRED;
390 }
391 else if (SEVERITY_ERROR == HRESULT_SEVERITY(hr) && FACILITY_WIN32 == HRESULT_FACILITY(hr))
392 {
393 // Convert Win32 HRESULTs back to the error code.
394 dwQuit = HRESULT_CODE(hr);
395 }
396 else
397 {
398 dwQuit = hr;
399 }
400
401 // initiate engine shutdown
402 pThis->m_pEngine->Quit(dwQuit);
403
404 // uninitialize COM
405 if (fComInitialized)
406 {
407 ::CoUninitialize();
408 }
409
410 return hr;
411 }
412
413
414 //
415 // InitializeData - initializes all the package and prerequisite information.
416 //
417 HRESULT InitializeData()
418 {
419 HRESULT hr = S_OK;
420 IXMLDOMDocument* pixdManifest = NULL;
421
422 hr = XmlInitialize();
423 BalExitOnFailure(hr, "Failed to initialize XML.");
424
425 hr = BalManifestLoad(m_hModule, &pixdManifest);
426 BalExitOnFailure(hr, "Failed to load bootstrapper application manifest.");
427
428 hr = BalInfoParseFromXml(&m_Bundle, pixdManifest);
429 BalExitOnFailure(hr, "Failed to load bundle information.");
430
431 hr = EnsureSinglePrimaryPackage();
432 BalExitOnFailure(hr, "Failed to ensure single primary package.");
433
434 hr = ProcessCommandLine();
435 ExitOnFailure(hr, "Unknown commandline parameters.");
436
437 hr = BalConditionsParseFromXml(&m_Conditions, pixdManifest, NULL);
438 BalExitOnFailure(hr, "Failed to load conditions from XML.");
439
440 LExit:
441 ReleaseObject(pixdManifest);
442
443 return hr;
444 }
445
446
447 //
448 // ProcessCommandLine - process the provided command line arguments.
449 //
450 HRESULT ProcessCommandLine()
451 {
452 HRESULT hr = S_OK;
453 int argc = 0;
454 LPWSTR* argv = NULL;
455
456 argc = m_BalInfoCommand.cUnknownArgs;
457 argv = m_BalInfoCommand.rgUnknownArgs;
458
459 for (int i = 0; i < argc; ++i)
460 {
461 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Ignoring unknown argument: %ls", argv[i]);
462 }
463
464 hr = BalSetOverridableVariablesFromEngine(&m_Bundle.overridableVariables, &m_BalInfoCommand, m_pEngine);
465 BalExitOnFailure(hr, "Failed to set overridable variables from the command line.");
466
467 LExit:
468 return hr;
469 }
470
471 HRESULT EnsureSinglePrimaryPackage()
472 {
473 HRESULT hr = S_OK;
474 BAL_INFO_PACKAGE* pDefaultPackage = NULL;
475 BOOL fPrimaryArchSpecific = FALSE;
476 USHORT usNativeMachine = 0;
477 BAL_INFO_PRIMARY_PACKAGE_TYPE nativeType = BAL_INFO_PRIMARY_PACKAGE_TYPE_NONE;
478
479 hr = ProcNativeMachine(::GetCurrentProcess(), &usNativeMachine);
480 BalExitOnFailure(hr, "Failed to get native machine value.");
481
482 if (S_FALSE != hr)
483 {
484 switch (usNativeMachine)
485 {
486 case IMAGE_FILE_MACHINE_I386:
487 nativeType = BAL_INFO_PRIMARY_PACKAGE_TYPE_X86;
488 break;
489 case IMAGE_FILE_MACHINE_AMD64:
490 nativeType = BAL_INFO_PRIMARY_PACKAGE_TYPE_X64;
491 break;
492 case IMAGE_FILE_MACHINE_ARM64:
493 nativeType = BAL_INFO_PRIMARY_PACKAGE_TYPE_ARM64;
494 break;
495 }
496 }
497 else
498 {
499#if !defined(_WIN64)
500 BOOL fIsWow64 = FALSE;
501
502 ProcWow64(::GetCurrentProcess(), &fIsWow64);
503 if (!fIsWow64)
504 {
505 nativeType = BAL_INFO_PRIMARY_PACKAGE_TYPE_X86;
506 }
507 else
508#endif
509 {
510 nativeType = BAL_INFO_PRIMARY_PACKAGE_TYPE_X64;
511 }
512 }
513
514 for (DWORD i = 0; i < m_Bundle.packages.cPackages; ++i)
515 {
516 BAL_INFO_PACKAGE* pPackage = m_Bundle.packages.rgPackages + i;
517
518 if (BAL_INFO_PRIMARY_PACKAGE_TYPE_NONE == pPackage->primaryPackageType)
519 {
520 // Skip.
521 }
522 else if (nativeType == pPackage->primaryPackageType)
523 {
524 if (fPrimaryArchSpecific)
525 {
526 BalExitWithRootFailure(hr, E_INVALIDDATA, "Bundle contains multiple primary packages for same architecture: %u.", nativeType);
527 }
528
529 pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_DEFAULT;
530 fPrimaryArchSpecific = TRUE;
531 }
532 else if (BAL_INFO_PRIMARY_PACKAGE_TYPE_DEFAULT == pPackage->primaryPackageType)
533 {
534 if (pDefaultPackage)
535 {
536 BalExitWithRootFailure(hr, E_INVALIDDATA, "Bundle contains multiple default primary packages.");
537 }
538
539 pDefaultPackage = pPackage;
540 }
541 }
542
543 BalExitOnNull(pDefaultPackage, hr, E_INVALIDSTATE, "Bundle did not contain default primary package.");
544
545 if (fPrimaryArchSpecific)
546 {
547 pDefaultPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_NONE;
548 }
549
550 LExit:
551 return hr;
552 }
553
554
555 //
556 // CreateMainWindow - creates the main install window.
557 //
558 HRESULT CreateMainWindow()
559 {
560 HRESULT hr = S_OK;
561 WNDCLASSW wc = { };
562 DWORD dwWindowStyle = WS_POPUP;
563
564 wc.lpfnWndProc = CWixInternalUIBootstrapperApplication::WndProc;
565 wc.hInstance = m_hModule;
566 wc.lpszClassName = WIXIUIBA_WINDOW_CLASS;
567
568 if (!::RegisterClassW(&wc))
569 {
570 ExitWithLastError(hr, "Failed to register window.");
571 }
572
573 m_fRegistered = TRUE;
574
575 // If the UI should be visible, allow it to be visible and activated so we are the foreground window.
576 // This allows the UAC prompt and MSI UI to automatically be activated.
577 if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay)
578 {
579 dwWindowStyle |= WS_VISIBLE;
580 }
581
582 m_hWnd = ::CreateWindowExW(WS_EX_TOOLWINDOW, wc.lpszClassName, NULL, dwWindowStyle, 0, 0, 0, 0, HWND_DESKTOP, NULL, m_hModule, this);
583 ExitOnNullWithLastError(m_hWnd, hr, "Failed to create internal UI main window.");
584
585 LExit:
586 return hr;
587 }
588
589 //
590 // DestroyMainWindow - clean up all the window registration.
591 //
592 void DestroyMainWindow()
593 {
594 if (::IsWindow(m_hWnd))
595 {
596 ::DestroyWindow(m_hWnd);
597 m_hWnd = NULL;
598 }
599
600 if (m_fRegistered)
601 {
602 ::UnregisterClassW(WIXIUIBA_WINDOW_CLASS, m_hModule);
603 m_fRegistered = FALSE;
604 }
605 }
606
607 //
608 // WndProc - standard windows message handler.
609 //
610 static LRESULT CALLBACK WndProc(
611 __in HWND hWnd,
612 __in UINT uMsg,
613 __in WPARAM wParam,
614 __in LPARAM lParam
615 )
616 {
617#pragma warning(suppress:4312)
618 CWixInternalUIBootstrapperApplication* pBA = reinterpret_cast<CWixInternalUIBootstrapperApplication*>(::GetWindowLongPtrW(hWnd, GWLP_USERDATA));
619
620 switch (uMsg)
621 {
622 case WM_NCCREATE:
623 {
624 LPCREATESTRUCT lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);
625 pBA = reinterpret_cast<CWixInternalUIBootstrapperApplication*>(lpcs->lpCreateParams);
626#pragma warning(suppress:4244)
627 ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pBA));
628 }
629 break;
630
631 case WM_NCDESTROY:
632 {
633 LRESULT lres = ::DefWindowProcW(hWnd, uMsg, wParam, lParam);
634 ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, 0);
635 ::PostQuitMessage(0);
636 return lres;
637 }
638
639 case WM_CLOSE:
640 // If the user chose not to close, do *not* let the default window proc handle the message.
641 if (!pBA->OnClose())
642 {
643 return 0;
644 }
645 break;
646
647 case WM_WIXIUIBA_DETECT_PACKAGES: __fallthrough;
648 case WM_WIXIUIBA_DETECT_FOR_CLEANUP:
649 pBA->OnDetect();
650 return 0;
651
652 case WM_WIXIUIBA_PLAN_PACKAGES:
653 case WM_WIXIUIBA_PLAN_PACKAGES_FOR_CLEANUP:
654 pBA->OnPlan(static_cast<BOOTSTRAPPER_ACTION>(lParam));
655 return 0;
656
657 case WM_WIXIUIBA_APPLY_PACKAGES:
658 pBA->OnApply();
659 return 0;
660 }
661
662 return ::DefWindowProcW(hWnd, uMsg, wParam, lParam);
663 }
664
665
666 //
667 // OnDetect - start the processing of packages.
668 //
669 void OnDetect()
670 {
671 HRESULT hr = S_OK;
672
673 hr = m_pEngine->Detect();
674 BalExitOnFailure(hr, "Failed to start detecting chain.");
675
676 LExit:
677 if (FAILED(hr))
678 {
679 SetLoadPackageFailure(hr);
680 }
681 }
682
683
684 //
685 // OnPlan - plan the detected changes.
686 //
687 void OnPlan(
688 __in BOOTSTRAPPER_ACTION action
689 )
690 {
691 HRESULT hr = S_OK;
692
693 m_plannedAction = action;
694
695 hr = m_pEngine->Plan(action);
696 BalExitOnFailure(hr, "Failed to start planning packages.");
697
698 LExit:
699 if (FAILED(hr))
700 {
701 SetLoadPackageFailure(hr);
702 }
703 }
704
705
706 //
707 // OnApply - apply the packages.
708 //
709 void OnApply()
710 {
711 HRESULT hr = S_OK;
712
713 hr = m_pEngine->Apply(m_hWnd);
714 BalExitOnFailure(hr, "Failed to start applying packages.");
715
716 LExit:
717 if (FAILED(hr))
718 {
719 SetLoadPackageFailure(hr);
720 }
721 }
722
723
724 //
725 // OnClose - called when the window is trying to be closed.
726 //
727 BOOL OnClose()
728 {
729 BOOL fClose = FALSE;
730
731 // If we've already applied, just close.
732 if (m_fApplied)
733 {
734 fClose = TRUE;
735 }
736 else
737 {
738 PromptCancel(m_hWnd, TRUE, NULL, NULL);
739
740 // If we're inside Apply then we never close, we just cancel to let rollback occur.
741 fClose = !m_fApplying;
742 }
743
744 return fClose;
745 }
746
747
748 HRESULT EvaluateConditions()
749 {
750 HRESULT hr = S_OK;
751 BOOL fResult = FALSE;
752
753 for (DWORD i = 0; i < m_Conditions.cConditions; ++i)
754 {
755 BAL_CONDITION* pCondition = m_Conditions.rgConditions + i;
756
757 hr = BalConditionEvaluate(pCondition, m_pEngine, &fResult, &m_sczFailedMessage);
758 BalExitOnFailure(hr, "Failed to evaluate condition.");
759
760 if (!fResult)
761 {
762 hr = E_WIXSTDBA_CONDITION_FAILED;
763 BalExitOnFailure(hr, "%ls", m_sczFailedMessage);
764 }
765 }
766
767 ReleaseNullStrSecure(m_sczFailedMessage);
768
769 LExit:
770 return hr;
771 }
772
773
774 void SetLoadPackageFailure(
775 __in HRESULT hrStatus
776 )
777 {
778 Assert(FAILED(hrStatus));
779
780 if (!m_fApplied)
781 {
782 m_hrFinal = hrStatus;
783 m_fFailedToLoadPackage = TRUE;
784 }
785
786 // Quietly exit.
787 ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0);
788 }
789
790
791public:
792 //
793 // Constructor - initialize member variables.
794 //
795 CWixInternalUIBootstrapperApplication(
796 __in HMODULE hModule
797 ) : CBalBaseBootstrapperApplication(3, 3000)
798 {
799 m_hModule = hModule;
800 m_commandAction = BOOTSTRAPPER_ACTION_UNKNOWN;
801 m_commandDisplay = BOOTSTRAPPER_DISPLAY_UNKNOWN;
802
803 m_plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN;
804
805 m_Bundle = { };
806 m_Conditions = { };
807 m_sczConfirmCloseMessage = NULL;
808 m_sczFailedMessage = NULL;
809
810 m_hUiThread = NULL;
811 m_fRegistered = FALSE;
812 m_hWnd = NULL;
813
814 m_hrFinal = S_OK;
815
816 m_restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE;
817
818 m_fApplying = FALSE;
819 m_fApplied = FALSE;
820 m_fAutomaticRemoval = FALSE;
821 m_fFailedToLoadPackage = FALSE;
822 }
823
824
825 //
826 // Destructor - release member variables.
827 //
828 ~CWixInternalUIBootstrapperApplication()
829 {
830 ReleaseStr(m_sczFailedMessage);
831 ReleaseStr(m_sczConfirmCloseMessage);
832 BalConditionsUninitialize(&m_Conditions);
833 BalInfoUninitialize(&m_Bundle);
834
835 ReleaseNullObject(m_pEngine);
836 }
837
838private:
839 HMODULE m_hModule;
840 BOOTSTRAPPER_ACTION m_commandAction;
841 BOOTSTRAPPER_DISPLAY m_commandDisplay;
842
843 BOOTSTRAPPER_ACTION m_plannedAction;
844
845 BAL_INFO_BUNDLE m_Bundle;
846 BAL_CONDITIONS m_Conditions;
847 LPWSTR m_sczFailedMessage;
848 LPWSTR m_sczConfirmCloseMessage;
849
850 HANDLE m_hUiThread;
851 BOOL m_fRegistered;
852 HWND m_hWnd;
853
854 HRESULT m_hrFinal;
855
856 BOOTSTRAPPER_APPLY_RESTART m_restartResult;
857
858 BOOL m_fApplying;
859 BOOL m_fApplied;
860 BOOL m_fAutomaticRemoval;
861 BOOL m_fFailedToLoadPackage;
862};
863
864
865//
866// CreateBootstrapperApplication - creates a new IBootstrapperApplication object.
867//
868EXTERN_C HRESULT CreateWixInternalUIBootstrapperApplication(
869 __in HMODULE hInstance,
870 __out IBootstrapperApplication** ppApplication
871)
872{
873 HRESULT hr = S_OK;
874
875 CWixInternalUIBootstrapperApplication* pApplication = new CWixInternalUIBootstrapperApplication(hInstance);
876 ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new internal UI bootstrapper application.");
877
878 hr = pApplication->QueryInterface(IID_PPV_ARGS(ppApplication));
879 ExitOnRootFailure(hr, "Failed to query for IBootstrapperApplication.");
880
881LExit:
882 ReleaseObject(pApplication);
883
884 return hr;
885}
diff --git a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp
new file mode 100644
index 00000000..233cabbc
--- /dev/null
+++ b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp
@@ -0,0 +1,5373 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3#include "precomp.h"
4#include "BalBaseBootstrapperApplication.h"
5
6static const LPCWSTR WIXBUNDLE_VARIABLE_CANRESTART = L"WixCanRestart";
7static const LPCWSTR WIXBUNDLE_VARIABLE_ELEVATED = L"WixBundleElevated";
8
9static const LPCWSTR WIXSTDBA_WINDOW_CLASS = L"WixStdBA";
10
11static const LPCWSTR WIXSTDBA_VARIABLE_INSTALL_FOLDER = L"InstallFolder";
12static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH = L"LaunchTarget";
13static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID = L"LaunchTargetElevatedId";
14static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS = L"LaunchArguments";
15static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_HIDDEN = L"LaunchHidden";
16static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER = L"LaunchWorkingFolder";
17
18static const DWORD WIXSTDBA_ACQUIRE_PERCENTAGE = 30;
19
20static const LPCWSTR WIXSTDBA_VARIABLE_BUNDLE_FILE_VERSION = L"WixBundleFileVersion";
21static const LPCWSTR WIXSTDBA_VARIABLE_LANGUAGE_ID = L"WixStdBALanguageId";
22static const LPCWSTR WIXSTDBA_VARIABLE_RESTART_REQUIRED = L"WixStdBARestartRequired";
23static const LPCWSTR WIXSTDBA_VARIABLE_SHOW_VERSION = L"WixStdBAShowVersion";
24static const LPCWSTR WIXSTDBA_VARIABLE_SUPPRESS_OPTIONS_UI = L"WixStdBASuppressOptionsUI";
25static const LPCWSTR WIXSTDBA_VARIABLE_UPDATE_AVAILABLE = L"WixStdBAUpdateAvailable";
26
27enum WIXSTDBA_STATE
28{
29 WIXSTDBA_STATE_INITIALIZING,
30 WIXSTDBA_STATE_INITIALIZED,
31 WIXSTDBA_STATE_HELP,
32 WIXSTDBA_STATE_DETECTING,
33 WIXSTDBA_STATE_DETECTED,
34 WIXSTDBA_STATE_PLANNING_PREREQS,
35 WIXSTDBA_STATE_PLANNED_PREREQS,
36 WIXSTDBA_STATE_PLANNING,
37 WIXSTDBA_STATE_PLANNED,
38 WIXSTDBA_STATE_APPLYING,
39 WIXSTDBA_STATE_CACHING,
40 WIXSTDBA_STATE_CACHED,
41 WIXSTDBA_STATE_EXECUTING,
42 WIXSTDBA_STATE_EXECUTED,
43 WIXSTDBA_STATE_APPLIED,
44 WIXSTDBA_STATE_FAILED,
45};
46
47enum WM_WIXSTDBA
48{
49 WM_WIXSTDBA_SHOW_HELP = WM_APP + 100,
50 WM_WIXSTDBA_DETECT_PACKAGES,
51 WM_WIXSTDBA_PLAN_PACKAGES,
52 WM_WIXSTDBA_APPLY_PACKAGES,
53 WM_WIXSTDBA_CHANGE_STATE,
54 WM_WIXSTDBA_SHOW_FAILURE,
55 WM_WIXSTDBA_PLAN_PREREQS,
56};
57
58// This enum must be kept in the same order as the vrgwzPageNames array.
59enum WIXSTDBA_PAGE
60{
61 WIXSTDBA_PAGE_LOADING,
62 WIXSTDBA_PAGE_HELP,
63 WIXSTDBA_PAGE_INSTALL,
64 WIXSTDBA_PAGE_MODIFY,
65 WIXSTDBA_PAGE_PROGRESS,
66 WIXSTDBA_PAGE_PROGRESS_PASSIVE,
67 WIXSTDBA_PAGE_SUCCESS,
68 WIXSTDBA_PAGE_FAILURE,
69 COUNT_WIXSTDBA_PAGE,
70};
71
72// This array must be kept in the same order as the WIXSTDBA_PAGE enum.
73static LPCWSTR vrgwzPageNames[] = {
74 L"Loading",
75 L"Help",
76 L"Install",
77 L"Modify",
78 L"Progress",
79 L"ProgressPassive",
80 L"Success",
81 L"Failure",
82};
83
84// The range [0, 100) is unused to avoid collisions with system ids,
85// the range [100, 0x4000) is unused to avoid collisions with thmutil,
86// the range [0x4000, 0x8000) is unused to avoid collisions with BAFunctions.
87const WORD WIXSTDBA_FIRST_ASSIGN_CONTROL_ID = 0x8000;
88
89enum WIXSTDBA_CONTROL
90{
91 // Welcome page
92 WIXSTDBA_CONTROL_INSTALL_BUTTON = WIXSTDBA_FIRST_ASSIGN_CONTROL_ID,
93 WIXSTDBA_CONTROL_EULA_RICHEDIT,
94 WIXSTDBA_CONTROL_EULA_LINK,
95 WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX,
96
97 // Modify page
98 WIXSTDBA_CONTROL_REPAIR_BUTTON,
99 WIXSTDBA_CONTROL_UNINSTALL_BUTTON,
100
101 // Updates
102 WIXSTDBA_CONTROL_CHECKING_FOR_UPDATES_LABEL,
103 WIXSTDBA_CONTROL_INSTALL_UPDATE_BUTTON,
104 WIXSTDBA_CONTROL_MODIFY_UPDATE_BUTTON,
105
106 // Progress page
107 WIXSTDBA_CONTROL_CACHE_PROGRESS_PACKAGE_TEXT,
108 WIXSTDBA_CONTROL_CACHE_PROGRESS_BAR,
109 WIXSTDBA_CONTROL_CACHE_PROGRESS_TEXT,
110
111 WIXSTDBA_CONTROL_EXECUTE_PROGRESS_PACKAGE_TEXT,
112 WIXSTDBA_CONTROL_EXECUTE_PROGRESS_BAR,
113 WIXSTDBA_CONTROL_EXECUTE_PROGRESS_TEXT,
114 WIXSTDBA_CONTROL_EXECUTE_PROGRESS_ACTIONDATA_TEXT,
115
116 WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT,
117 WIXSTDBA_CONTROL_OVERALL_PROGRESS_BAR,
118 WIXSTDBA_CONTROL_OVERALL_CALCULATED_PROGRESS_BAR,
119 WIXSTDBA_CONTROL_OVERALL_PROGRESS_TEXT,
120
121 WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON,
122
123 // Success page
124 WIXSTDBA_CONTROL_LAUNCH_BUTTON,
125 WIXSTDBA_CONTROL_SUCCESS_RESTART_BUTTON,
126
127 // Failure page
128 WIXSTDBA_CONTROL_FAILURE_LOGFILE_LINK,
129 WIXSTDBA_CONTROL_FAILURE_MESSAGE_TEXT,
130 WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON,
131
132 LAST_WIXSTDBA_CONTROL,
133};
134
135
136static HRESULT DAPI EvaluateVariableConditionCallback(
137 __in_z LPCWSTR wzCondition,
138 __out BOOL* pf,
139 __in_opt LPVOID pvContext
140 );
141static HRESULT DAPI FormatVariableStringCallback(
142 __in_z LPCWSTR wzFormat,
143 __inout LPWSTR* psczOut,
144 __in_opt LPVOID pvContext
145 );
146static HRESULT DAPI GetVariableNumericCallback(
147 __in_z LPCWSTR wzVariable,
148 __out LONGLONG* pllValue,
149 __in_opt LPVOID pvContext
150 );
151static HRESULT DAPI SetVariableNumericCallback(
152 __in_z LPCWSTR wzVariable,
153 __in LONGLONG llValue,
154 __in_opt LPVOID pvContext
155 );
156static HRESULT DAPI GetVariableStringCallback(
157 __in_z LPCWSTR wzVariable,
158 __inout LPWSTR* psczValue,
159 __in_opt LPVOID pvContext
160 );
161static HRESULT DAPI SetVariableStringCallback(
162 __in_z LPCWSTR wzVariable,
163 __in_z_opt LPCWSTR wzValue,
164 __in BOOL fFormatted,
165 __in_opt LPVOID pvContext
166 );
167static LPCSTR LoggingBoolToString(
168 __in BOOL f
169 );
170static LPCSTR LoggingRequestStateToString(
171 __in BOOTSTRAPPER_REQUEST_STATE requestState
172 );
173static LPCSTR LoggingPlanRelationTypeToString(
174 __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE type
175 );
176static LPCSTR LoggingMsiFeatureStateToString(
177 __in BOOTSTRAPPER_FEATURE_STATE featureState
178 );
179
180
181class CWixStandardBootstrapperApplication : public CBalBaseBootstrapperApplication
182{
183public: // IBootstrapperApplication
184 STDMETHODIMP OnCreate(
185 __in IBootstrapperEngine* pEngine,
186 __in BOOTSTRAPPER_COMMAND* pCommand
187 )
188 {
189 HRESULT hr = S_OK;
190
191 hr = __super::OnCreate(pEngine, pCommand);
192 BalExitOnFailure(hr, "CBalBaseBootstrapperApplication initialization failed.");
193
194 m_commandAction = pCommand->action;
195 m_commandDisplay = pCommand->display;
196 m_commandResumeType = pCommand->resumeType;
197 m_commandRelationType = pCommand->relationType;
198 m_hwndSplashScreen = pCommand->hwndSplashScreen;
199
200 hr = BalGetStringVariable(L"WixBundleVersion", &m_sczBundleVersion);
201 BalExitOnFailure(hr, "CWixStandardBootstrapperApplication initialization failed.");
202
203 hr = InitializeData(pCommand);
204 BalExitOnFailure(hr, "Failed to initialize data in bootstrapper application.");
205
206 LExit:
207 return hr;
208 }
209
210 STDMETHODIMP OnDestroy(
211 __in BOOL fReload
212 )
213 {
214 if (m_hBAFModule)
215 {
216 BA_FUNCTIONS_DESTROY_ARGS args = { };
217 BA_FUNCTIONS_DESTROY_RESULTS results = { };
218
219 args.cbSize = sizeof(BA_FUNCTIONS_DESTROY_ARGS);
220 args.fReload = fReload;
221
222 results.cbSize = sizeof(BA_FUNCTIONS_DESTROY_RESULTS);
223
224 PFN_BA_FUNCTIONS_DESTROY pfnBAFunctionsDestroy = reinterpret_cast<PFN_BA_FUNCTIONS_DESTROY>(::GetProcAddress(m_hBAFModule, "BAFunctionsDestroy"));
225 if (pfnBAFunctionsDestroy)
226 {
227 pfnBAFunctionsDestroy(&args, &results);
228 }
229
230 if (!results.fDisableUnloading)
231 {
232 m_pfnBAFunctionsProc = NULL;
233 m_pvBAFunctionsProcContext = NULL;
234
235 ::FreeLibrary(m_hBAFModule);
236 m_hBAFModule = NULL;
237 }
238 }
239
240 return __super::OnDestroy(fReload);
241 }
242
243 STDMETHODIMP OnStartup()
244 {
245 HRESULT hr = S_OK;
246 DWORD dwUIThreadId = 0;
247
248 // create UI thread
249 m_hUiThread = ::CreateThread(NULL, 0, UiThreadProc, this, 0, &dwUIThreadId);
250 if (!m_hUiThread)
251 {
252 BalExitWithLastError(hr, "Failed to create UI thread.");
253 }
254
255 LExit:
256 return hr;
257 }
258
259
260 STDMETHODIMP OnShutdown(
261 __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction
262 )
263 {
264 HRESULT hr = S_OK;
265
266 // wait for UI thread to terminate
267 if (m_hUiThread)
268 {
269 ::WaitForSingleObject(m_hUiThread, INFINITE);
270 ReleaseHandle(m_hUiThread);
271 }
272
273 // If a restart was required.
274 if (m_fRestartRequired)
275 {
276 if (m_fShouldRestart && m_fAllowRestart)
277 {
278 *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART;
279 }
280
281 if (m_fPrereq)
282 {
283 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART == *pAction
284 ? "The prerequisites scheduled a restart. The bootstrapper application will be reloaded after the computer is restarted."
285 : "A restart is required by the prerequisites but the user delayed it. The bootstrapper application will be reloaded after the computer is restarted.");
286 }
287 }
288 else if (m_fPrereqInstalled || m_fPrereqSkipped)
289 {
290 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, m_fPrereqInstalled
291 ? "The prerequisites were successfully installed. The bootstrapper application will be reloaded."
292 : "The prerequisites were already installed. The bootstrapper application will be reloaded.");
293 *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER;
294 }
295 else if (m_fPrereq)
296 {
297 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "The prerequisites were not successfully installed, error: 0x%x. The bootstrapper application will be not reloaded.", m_hrFinal);
298 }
299
300 return hr;
301 }
302
303 virtual STDMETHODIMP OnDetectBegin(
304 __in BOOL fCached,
305 __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType,
306 __in DWORD cPackages,
307 __inout BOOL* pfCancel
308 )
309 {
310 HRESULT hr = S_OK;
311 BOOL fInstalled = BOOTSTRAPPER_REGISTRATION_TYPE_FULL == registrationType;
312
313 if (m_fPrereq)
314 {
315 // Pre-requisite command action is set during initialization.
316 }
317 else if (BOOTSTRAPPER_DISPLAY_FULL <= m_commandDisplay) // only modify the action state if showing full UI.
318 {
319 // Maybe modify the action state if the bundle is or is not already installed.
320 if (fInstalled && BOOTSTRAPPER_RESUME_TYPE_REBOOT != m_commandResumeType && BOOTSTRAPPER_ACTION_INSTALL == m_commandAction)
321 {
322 m_commandAction = BOOTSTRAPPER_ACTION_MODIFY;
323 }
324 else if (!fInstalled && (BOOTSTRAPPER_ACTION_MODIFY == m_commandAction || BOOTSTRAPPER_ACTION_REPAIR == m_commandAction))
325 {
326 m_commandAction = BOOTSTRAPPER_ACTION_INSTALL;
327 }
328 }
329
330 // When resuming from restart doing some install-like operation, try to find the package that forced the
331 // restart. We'll use this information during planning.
332 if (BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_commandResumeType && BOOTSTRAPPER_ACTION_UNINSTALL < m_commandAction)
333 {
334 // Ensure the forced restart package variable is null when it is an empty string.
335 hr = BalGetStringVariable(L"WixBundleForcedRestartPackage", &m_sczAfterForcedRestartPackage);
336 if (FAILED(hr) || !m_sczAfterForcedRestartPackage || !*m_sczAfterForcedRestartPackage)
337 {
338 ReleaseNullStr(m_sczAfterForcedRestartPackage);
339 }
340
341 hr = S_OK;
342 }
343
344 if (!m_fPreplanPrereqs)
345 {
346 // If the UI should be visible, display it now and hide the splash screen
347 if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay)
348 {
349 ::ShowWindow(m_pTheme->hwndParent, SW_SHOW);
350 }
351
352 m_pEngine->CloseSplashScreen();
353 }
354
355 return __super::OnDetectBegin(fCached, registrationType, cPackages, pfCancel);
356 }
357
358 virtual STDMETHODIMP OnDetectRelatedBundle(
359 __in LPCWSTR wzBundleId,
360 __in BOOTSTRAPPER_RELATION_TYPE relationType,
361 __in LPCWSTR wzBundleTag,
362 __in BOOL fPerMachine,
363 __in LPCWSTR wzVersion,
364 __in BOOL fMissingFromCache,
365 __inout BOOL* pfCancel
366 )
367 {
368 BAL_INFO_PACKAGE* pPackage = NULL;
369
370 if (!fMissingFromCache)
371 {
372 BalInfoAddRelatedBundleAsPackage(&m_Bundle.packages, wzBundleId, relationType, fPerMachine, &pPackage);
373 // Best effort
374 }
375
376 if (BOOTSTRAPPER_ACTION_INSTALL == m_commandAction && BOOTSTRAPPER_RELATION_UPGRADE != m_commandRelationType && BOOTSTRAPPER_RELATION_UPGRADE == relationType)
377 {
378 int nResult = 0;
379 HRESULT hr = VerCompareStringVersions(m_sczBundleVersion, wzVersion, TRUE/*fStrict*/, &nResult);
380 BalExitOnFailure(hr, "Failed to compare bundle version: %ls to related bundle version: %ls.", m_sczBundleVersion, wzVersion);
381
382 if (0 > nResult)
383 {
384 m_fDowngrading = TRUE;
385
386 BalLog(BOOTSTRAPPER_LOG_LEVEL_VERBOSE, "Related bundle version: %ls is a downgrade for bundle version: %ls.", wzVersion, m_sczBundleVersion);
387 }
388 }
389
390 LExit:
391 return CBalBaseBootstrapperApplication::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, pfCancel);
392 }
393
394
395 virtual STDMETHODIMP OnDetectUpdateBegin(
396 __in_z LPCWSTR wzUpdateLocation,
397 __inout BOOL* pfCancel,
398 __inout BOOL* pfSkip
399 )
400 {
401#ifdef DEBUG
402 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnDetectUpdateBegin() - update location: %ls", wzUpdateLocation);
403#endif
404
405 // Try update detection only if we have a potential update source and are in full UI mode.
406 *pfSkip = !wzUpdateLocation
407 || !*wzUpdateLocation
408 || BOOTSTRAPPER_DISPLAY_FULL != m_commandDisplay;
409
410 ThemeShowControl(m_pControlCheckingForUpdatesLabel, *pfSkip ? SW_HIDE : SW_SHOW);
411
412 return __super::OnDetectUpdateBegin(wzUpdateLocation, pfCancel, pfSkip);
413 }
414
415
416 virtual STDMETHODIMP OnDetectUpdate(
417 __in_z LPCWSTR wzUpdateLocation,
418 __in DWORD64 dw64Size,
419 __in_z_opt LPCWSTR wzHash,
420 __in BOOTSTRAPPER_UPDATE_HASH_TYPE hashAlgorithm,
421 __in LPCWSTR wzUpdateVersion,
422 __in_z LPCWSTR wzTitle,
423 __in_z LPCWSTR wzSummary,
424 __in_z LPCWSTR wzContentType,
425 __in_z LPCWSTR wzContent,
426 __inout BOOL* pfCancel,
427 __inout BOOL* pfStopProcessingUpdates
428 )
429 {
430#ifdef DEBUG
431 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnDetectUpdate() - update location: %ls, version: %ls", wzUpdateLocation, wzUpdateVersion);
432#endif
433
434 HRESULT hr = S_OK;
435 int nResult = 0;
436 UUID guid = { };
437 WCHAR wzUpdatePackageId[39];
438 RPC_STATUS rs = RPC_S_OK;
439
440 hr = VerCompareStringVersions(m_sczBundleVersion, wzUpdateVersion, TRUE/*fStrict*/, &nResult);
441 BalExitOnFailure(hr, "Failed to compare bundle version: %ls to update version: %ls.", m_sczBundleVersion, wzUpdateVersion);
442
443 // Burn sends the feed in descending version order so we need only the first one.
444 *pfStopProcessingUpdates = TRUE;
445
446 if (0 <= nResult)
447 {
448 BalLog(BOOTSTRAPPER_LOG_LEVEL_VERBOSE, "WIXSTDBA: Update version: %ls is a match or downgrade for bundle version: %ls.", wzUpdateVersion, m_sczBundleVersion);
449 }
450 else
451 {
452 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: Update v%ls for bundle v%ls available from: %ls.", wzUpdateVersion, m_sczBundleVersion, wzUpdateLocation);
453
454 rs = ::UuidCreate(&guid);
455 hr = HRESULT_FROM_RPC(rs);
456 ExitOnFailure(hr, "Failed to generate bundle update package id.");
457
458 if (!::StringFromGUID2(guid, wzUpdatePackageId, countof(wzUpdatePackageId)))
459 {
460 hr = E_OUTOFMEMORY;
461 ExitOnRootFailure(hr, "Failed to create string from bundle update package id.");
462 }
463
464 hr = BalSetVersionVariable(WIXSTDBA_VARIABLE_UPDATE_AVAILABLE, wzUpdateVersion);
465 BalExitOnFailure(hr, "Failed to set WixStdBAUpdateAvailable value: %ls.", wzUpdateVersion);
466
467 hr = m_pEngine->SetUpdate(NULL, wzUpdateLocation, dw64Size, hashAlgorithm, wzHash, wzUpdatePackageId);
468 BalExitOnFailure(hr, "Failed to set update location: %ls.", wzUpdateLocation);
469
470 BalInfoAddUpdateBundleAsPackage(&m_Bundle.packages, wzUpdatePackageId, NULL);
471 }
472
473 LExit:
474 return __super::OnDetectUpdate(wzUpdateLocation, dw64Size, wzHash, hashAlgorithm, wzUpdateVersion, wzTitle, wzSummary, wzContentType, wzContent, pfCancel, pfStopProcessingUpdates);
475 }
476
477
478 virtual STDMETHODIMP OnDetectUpdateComplete(
479 __in HRESULT /*hrStatus*/,
480 __inout BOOL* pfIgnoreError
481 )
482 {
483 // A failed update is very sad indeed, but shouldn't be fatal.
484 *pfIgnoreError = TRUE;
485
486 return S_OK;
487 }
488
489 virtual STDMETHODIMP OnDetectComplete(
490 __in HRESULT hrStatus,
491 __in BOOL /*fEligibleForCleanup*/
492 )
493 {
494 HRESULT hr = S_OK;
495
496 if (m_fSuppressDowngradeFailure && m_fDowngrading)
497 {
498 SetState(WIXSTDBA_STATE_APPLIED, hrStatus);
499
500 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Bundle downgrade was attempted but downgrade failure has been suppressed.");
501
502 ExitFunction();
503 }
504
505 // If we're not interacting with the user or we're doing a layout or we're resuming just after a force restart
506 // then automatically start planning.
507 BOOL fSkipToPlan = SUCCEEDED(hrStatus) &&
508 (BOOTSTRAPPER_DISPLAY_FULL > m_commandDisplay ||
509 BOOTSTRAPPER_ACTION_LAYOUT == m_commandAction ||
510 BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_commandResumeType);
511
512 // If we're requiring user input (which currently means Install, Repair, or Uninstall)
513 // or if we're skipping to an action that modifies machine state
514 // then evaluate conditions.
515 BOOL fEvaluateConditions = SUCCEEDED(hrStatus) &&
516 (!fSkipToPlan || BOOTSTRAPPER_ACTION_LAYOUT < m_commandAction && BOOTSTRAPPER_ACTION_UPDATE_REPLACE > m_commandAction);
517
518 if (fEvaluateConditions)
519 {
520 hrStatus = EvaluateConditions();
521 }
522
523 SetState(WIXSTDBA_STATE_DETECTED, hrStatus);
524
525 if (SUCCEEDED(hrStatus))
526 {
527 if (m_fPreplanPrereqs)
528 {
529 ::PostMessageW(m_hWnd, WM_WIXSTDBA_PLAN_PREREQS, 0, BOOTSTRAPPER_ACTION_INSTALL);
530 }
531 else if (fSkipToPlan)
532 {
533 ::PostMessageW(m_hWnd, WM_WIXSTDBA_PLAN_PACKAGES, 0, m_commandAction);
534 }
535 }
536
537 LExit:
538 return hr;
539 }
540
541
542 virtual STDMETHODIMP OnPlanBegin(
543 __in DWORD cPackages,
544 __in BOOL* pfCancel
545 )
546 {
547 m_fPrereqPackagePlanned = FALSE;
548
549 return __super::OnPlanBegin(cPackages, pfCancel);
550 }
551
552
553 virtual STDMETHODIMP OnPlanRelatedBundleType(
554 __in_z LPCWSTR wzBundleId,
555 __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE recommendedType,
556 __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType,
557 __inout BOOL* pfCancel
558 )
559 {
560 // If we're only installing prerequisites, do not touch related bundles.
561 if (m_fPrereq)
562 {
563 *pRequestedType = BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_NONE;
564 }
565
566 return CBalBaseBootstrapperApplication::OnPlanRelatedBundleType(wzBundleId, recommendedType, pRequestedType, pfCancel);
567 }
568
569
570 virtual STDMETHODIMP OnPlanPackageBegin(
571 __in_z LPCWSTR wzPackageId,
572 __in BOOTSTRAPPER_PACKAGE_STATE state,
573 __in BOOL fCached,
574 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition,
575 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition,
576 __in BOOTSTRAPPER_REQUEST_STATE recommendedState,
577 __in BOOTSTRAPPER_CACHE_TYPE recommendedCacheType,
578 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestState,
579 __inout BOOTSTRAPPER_CACHE_TYPE* pRequestedCacheType,
580 __inout BOOL* pfCancel
581 )
582 {
583 HRESULT hr = S_OK;
584 BAL_INFO_PACKAGE* pPackage = NULL;
585
586 // If we're planning to install prerequisites, install them. The prerequisites need to be installed
587 // in all cases (even uninstall!) so the BA can load next.
588 if (m_fPrereq)
589 {
590 // Only install prerequisite packages, and check the InstallCondition on them.
591 BOOL fInstall = FALSE;
592
593 hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
594 if (SUCCEEDED(hr) && pPackage->fPrereqPackage)
595 {
596 fInstall = BOOTSTRAPPER_PACKAGE_CONDITION_FALSE != installCondition;
597 }
598
599 if (fInstall)
600 {
601 *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT;
602 }
603 else
604 {
605 *pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE;
606 }
607
608 // Don't force cache packages while installing prerequisites.
609 if (BOOTSTRAPPER_CACHE_TYPE_FORCE == *pRequestedCacheType)
610 {
611 *pRequestedCacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP;
612 }
613 }
614 else if (m_sczAfterForcedRestartPackage) // after force restart, skip packages until after the package that caused the restart.
615 {
616 // After restart we need to finish the dependency registration for our package so allow the package
617 // to go present.
618 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, m_sczAfterForcedRestartPackage, -1))
619 {
620 // Do not allow a repair because that could put us in a perpetual restart loop.
621 if (BOOTSTRAPPER_REQUEST_STATE_REPAIR == *pRequestState)
622 {
623 *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT;
624 }
625
626 ReleaseNullStr(m_sczAfterForcedRestartPackage); // no more skipping now.
627 }
628 else // not the matching package, so skip it.
629 {
630 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Skipping package: %ls, after restart because it was applied before the restart.", wzPackageId);
631
632 *pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE;
633 }
634 }
635
636 return CBalBaseBootstrapperApplication::OnPlanPackageBegin(wzPackageId, state, fCached, installCondition, repairCondition, recommendedState, recommendedCacheType, pRequestState, pRequestedCacheType, pfCancel);
637 }
638
639
640 virtual STDMETHODIMP OnPlanMsiPackage(
641 __in_z LPCWSTR wzPackageId,
642 __in BOOL fExecute,
643 __in BOOTSTRAPPER_ACTION_STATE action,
644 __in BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning,
645 __inout BOOL* pfCancel,
646 __inout BURN_MSI_PROPERTY* pActionMsiProperty,
647 __inout INSTALLUILEVEL* pUiLevel,
648 __inout BOOL* pfDisableExternalUiHandler,
649 __inout BOOTSTRAPPER_MSI_FILE_VERSIONING* pFileVersioning
650 )
651 {
652 HRESULT hr = S_OK;
653 BAL_INFO_PACKAGE* pPackage = NULL;
654 BOOL fShowInternalUI = FALSE;
655 INSTALLUILEVEL uiLevel = INSTALLUILEVEL_NOCHANGE;
656
657 switch (m_commandDisplay)
658 {
659 case BOOTSTRAPPER_DISPLAY_FULL:
660 uiLevel = INSTALLUILEVEL_FULL;
661 break;
662
663 case BOOTSTRAPPER_DISPLAY_PASSIVE:
664 uiLevel = INSTALLUILEVEL_REDUCED;
665 break;
666 }
667
668 if (INSTALLUILEVEL_NOCHANGE != uiLevel)
669 {
670 hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
671 if (SUCCEEDED(hr) && pPackage->sczDisplayInternalUICondition)
672 {
673 hr = BalEvaluateCondition(pPackage->sczDisplayInternalUICondition, &fShowInternalUI);
674 BalExitOnFailure(hr, "Failed to evaluate condition for package '%ls': %ls", wzPackageId, pPackage->sczDisplayInternalUICondition);
675
676 if (fShowInternalUI)
677 {
678 *pUiLevel = uiLevel;
679 }
680 }
681 }
682
683 LExit:
684 return __super::OnPlanMsiPackage(wzPackageId, fExecute, action, recommendedFileVersioning, pfCancel, pActionMsiProperty, pUiLevel, pfDisableExternalUiHandler, pFileVersioning);
685 }
686
687
688 virtual STDMETHODIMP OnPlannedPackage(
689 __in_z LPCWSTR wzPackageId,
690 __in BOOTSTRAPPER_ACTION_STATE execute,
691 __in BOOTSTRAPPER_ACTION_STATE rollback,
692 __in BOOL fPlannedCache,
693 __in BOOL fPlannedUncache
694 )
695 {
696 if (m_fPrereq && BOOTSTRAPPER_ACTION_STATE_NONE != execute)
697 {
698 m_fPrereqPackagePlanned = TRUE;
699 }
700
701 return __super::OnPlannedPackage(wzPackageId, execute, rollback, fPlannedCache, fPlannedUncache);
702 }
703
704
705 virtual STDMETHODIMP OnPlanComplete(
706 __in HRESULT hrStatus
707 )
708 {
709 HRESULT hr = S_OK;
710 BOOL fPreplannedPrereqs = WIXSTDBA_STATE_PLANNING_PREREQS == m_state;
711 WIXSTDBA_STATE completedState = WIXSTDBA_STATE_PLANNED;
712 BOOL fApply = TRUE;
713
714 if (fPreplannedPrereqs)
715 {
716 if (SUCCEEDED(hrStatus) && !m_fPrereqPackagePlanned)
717 {
718 // Nothing to do, so close and let the parent BA take over.
719 m_fPrereqSkipped = TRUE;
720 SetState(WIXSTDBA_STATE_APPLIED, S_OK);
721 ExitFunction();
722 }
723 else if (BOOTSTRAPPER_ACTION_HELP == m_commandAction)
724 {
725 // If prereq packages were planned then the managed BA probably can't be loaded, so show the help from this BA.
726
727 // Need to force the state change since normally moving backwards is prevented.
728 ::PostMessageW(m_hWnd, WM_WIXSTDBA_CHANGE_STATE, 0, WIXSTDBA_STATE_HELP);
729
730 ::PostMessageW(m_hWnd, WM_WIXSTDBA_SHOW_HELP, 0, 0);
731
732 ExitFunction();
733 }
734
735 completedState = WIXSTDBA_STATE_PLANNED_PREREQS;
736 }
737
738 SetState(completedState, hrStatus);
739
740 if (FAILED(hrStatus))
741 {
742 ExitFunction();
743 }
744
745 if (fPreplannedPrereqs)
746 {
747 // If the UI should be visible, display it now and hide the splash screen
748 if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay)
749 {
750 ::ShowWindow(m_pTheme->hwndParent, SW_SHOW);
751 }
752
753 m_pEngine->CloseSplashScreen();
754
755 fApply = BOOTSTRAPPER_DISPLAY_FULL > m_commandDisplay ||
756 BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_commandResumeType;
757 }
758
759 if (fApply)
760 {
761 ::PostMessageW(m_hWnd, WM_WIXSTDBA_APPLY_PACKAGES, 0, 0);
762 }
763
764 LExit:
765 return hr;
766 }
767
768
769 virtual STDMETHODIMP OnApplyBegin(
770 __in DWORD dwPhaseCount,
771 __in BOOL* pfCancel
772 )
773 {
774 m_fStartedExecution = FALSE;
775 m_dwCalculatedCacheProgress = 0;
776 m_dwCalculatedExecuteProgress = 0;
777 m_nLastMsiFilesInUseResult = IDNOACTION;
778 m_nLastNetfxFilesInUseResult = IDNOACTION;
779
780 return __super::OnApplyBegin(dwPhaseCount, pfCancel);
781 }
782
783
784 virtual STDMETHODIMP OnPauseAutomaticUpdatesBegin(
785 )
786 {
787 HRESULT hr = S_OK;
788 LOC_STRING* pLocString = NULL;
789 LPWSTR sczFormattedString = NULL;
790 LPCWSTR wz = NULL;
791
792 hr = __super::OnPauseAutomaticUpdatesBegin();
793
794 LocGetString(m_pWixLoc, L"#(loc.PauseAutomaticUpdatesMessage)", &pLocString);
795
796 if (pLocString)
797 {
798 BalFormatString(pLocString->wzText, &sczFormattedString);
799 }
800
801 wz = sczFormattedString ? sczFormattedString : L"Pausing Windows automatic updates";
802
803 ThemeSetTextControl(m_pControlOverallProgressPackageText, wz);
804
805 ReleaseStr(sczFormattedString);
806 return hr;
807 }
808
809
810 virtual STDMETHODIMP OnSystemRestorePointBegin(
811 )
812 {
813 HRESULT hr = S_OK;
814 LOC_STRING* pLocString = NULL;
815 LPWSTR sczFormattedString = NULL;
816 LPCWSTR wz = NULL;
817
818 hr = __super::OnSystemRestorePointBegin();
819
820 LocGetString(m_pWixLoc, L"#(loc.SystemRestorePointMessage)", &pLocString);
821
822 if (pLocString)
823 {
824 BalFormatString(pLocString->wzText, &sczFormattedString);
825 }
826
827 wz = sczFormattedString ? sczFormattedString : L"Creating system restore point";
828
829 ThemeSetTextControl(m_pControlOverallProgressPackageText, wz);
830
831 ReleaseStr(sczFormattedString);
832 return hr;
833 }
834
835
836 virtual STDMETHODIMP OnCachePackageBegin(
837 __in_z LPCWSTR wzPackageId,
838 __in DWORD cCachePayloads,
839 __in DWORD64 dw64PackageCacheSize,
840 __in BOOL fVital,
841 __inout BOOL* pfCancel
842 )
843 {
844 if (wzPackageId && *wzPackageId)
845 {
846 BAL_INFO_PACKAGE* pPackage = NULL;
847 HRESULT hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
848 LPCWSTR wz = (SUCCEEDED(hr) && pPackage->sczDisplayName) ? pPackage->sczDisplayName : wzPackageId;
849
850 ThemeSetTextControl(m_pControlCacheProgressPackageText, wz);
851
852 // If something started executing, leave it in the overall progress text.
853 if (!m_fStartedExecution)
854 {
855 ThemeSetTextControl(m_pControlOverallProgressPackageText, wz);
856 }
857 }
858
859 return __super::OnCachePackageBegin(wzPackageId, cCachePayloads, dw64PackageCacheSize, fVital, pfCancel);
860 }
861
862
863 virtual STDMETHODIMP OnCacheAcquireProgress(
864 __in_z LPCWSTR wzPackageOrContainerId,
865 __in_z_opt LPCWSTR wzPayloadId,
866 __in DWORD64 dw64Progress,
867 __in DWORD64 dw64Total,
868 __in DWORD dwOverallPercentage,
869 __inout BOOL* pfCancel
870 )
871 {
872#ifdef DEBUG
873 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnCacheAcquireProgress() - container/package: %ls, payload: %ls, progress: %I64u, total: %I64u, overall progress: %u%%", wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage);
874#endif
875
876 UpdateCacheProgress(dwOverallPercentage);
877
878 return __super::OnCacheAcquireProgress(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, pfCancel);
879 }
880
881
882 virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyProgress(
883 __in_z LPCWSTR wzPackageOrContainerId,
884 __in_z_opt LPCWSTR wzPayloadId,
885 __in DWORD64 dw64Progress,
886 __in DWORD64 dw64Total,
887 __in DWORD dwOverallPercentage,
888 __inout BOOL* pfCancel
889 )
890 {
891#ifdef DEBUG
892 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnCacheContainerOrPayloadVerifyProgress() - container/package: %ls, payload: %ls, progress: %I64u, total: %I64u, overall progress: %u%%", wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage);
893#endif
894
895 UpdateCacheProgress(dwOverallPercentage);
896
897 return __super::OnCacheContainerOrPayloadVerifyProgress(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, pfCancel);
898 }
899
900
901 virtual STDMETHODIMP OnCachePayloadExtractProgress(
902 __in_z LPCWSTR wzPackageOrContainerId,
903 __in_z_opt LPCWSTR wzPayloadId,
904 __in DWORD64 dw64Progress,
905 __in DWORD64 dw64Total,
906 __in DWORD dwOverallPercentage,
907 __inout BOOL* pfCancel
908 )
909 {
910#ifdef DEBUG
911 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnCachePayloadExtractProgress() - container/package: %ls, payload: %ls, progress: %I64u, total: %I64u, overall progress: %u%%", wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage);
912#endif
913
914 UpdateCacheProgress(dwOverallPercentage);
915
916 return __super::OnCachePayloadExtractProgress(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, pfCancel);
917 }
918
919
920 virtual STDMETHODIMP OnCacheVerifyProgress(
921 __in_z LPCWSTR wzPackageOrContainerId,
922 __in_z_opt LPCWSTR wzPayloadId,
923 __in DWORD64 dw64Progress,
924 __in DWORD64 dw64Total,
925 __in DWORD dwOverallPercentage,
926 __in BOOTSTRAPPER_CACHE_VERIFY_STEP verifyStep,
927 __inout BOOL* pfCancel
928 )
929 {
930#ifdef DEBUG
931 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnCacheVerifyProgress() - container/package: %ls, payload: %ls, progress: %I64u, total: %I64u, overall progress: %u%%, step: %u", wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, verifyStep);
932#endif
933
934 UpdateCacheProgress(dwOverallPercentage);
935
936 return __super::OnCacheVerifyProgress(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, verifyStep, pfCancel);
937 }
938
939
940 virtual STDMETHODIMP OnCacheAcquireComplete(
941 __in_z LPCWSTR wzPackageOrContainerId,
942 __in_z_opt LPCWSTR wzPayloadId,
943 __in HRESULT hrStatus,
944 __in BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation,
945 __inout BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION* pAction
946 )
947 {
948 SetProgressState(hrStatus);
949 return __super::OnCacheAcquireComplete(wzPackageOrContainerId, wzPayloadId, hrStatus, recommendation, pAction);
950 }
951
952
953 virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyComplete(
954 __in_z LPCWSTR wzPackageOrContainerId,
955 __in_z_opt LPCWSTR wzPayloadId,
956 __in HRESULT hrStatus
957 )
958 {
959 SetProgressState(hrStatus);
960 return __super::OnCacheContainerOrPayloadVerifyComplete(wzPackageOrContainerId, wzPayloadId, hrStatus);
961 }
962
963
964 virtual STDMETHODIMP OnCachePayloadExtractComplete(
965 __in_z LPCWSTR wzPackageOrContainerId,
966 __in_z_opt LPCWSTR wzPayloadId,
967 __in HRESULT hrStatus
968 )
969 {
970 SetProgressState(hrStatus);
971 return __super::OnCachePayloadExtractComplete(wzPackageOrContainerId, wzPayloadId, hrStatus);
972 }
973
974
975 virtual STDMETHODIMP OnCacheVerifyComplete(
976 __in_z LPCWSTR wzPackageId,
977 __in_z LPCWSTR wzPayloadId,
978 __in HRESULT hrStatus,
979 __in BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation,
980 __inout BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION* pAction
981 )
982 {
983 SetProgressState(hrStatus);
984 return __super::OnCacheVerifyComplete(wzPackageId, wzPayloadId, hrStatus, recommendation, pAction);
985 }
986
987
988 virtual STDMETHODIMP OnCacheComplete(
989 __in HRESULT hrStatus
990 )
991 {
992 UpdateCacheProgress(SUCCEEDED(hrStatus) ? 100 : 0);
993 ThemeSetTextControl(m_pControlCacheProgressPackageText, L"");
994 SetState(WIXSTDBA_STATE_CACHED, S_OK); // we always return success here and let OnApplyComplete() deal with the error.
995 return __super::OnCacheComplete(hrStatus);
996 }
997
998
999 virtual STDMETHODIMP OnError(
1000 __in BOOTSTRAPPER_ERROR_TYPE errorType,
1001 __in LPCWSTR wzPackageId,
1002 __in DWORD dwCode,
1003 __in_z LPCWSTR wzError,
1004 __in DWORD dwUIHint,
1005 __in DWORD cData,
1006 __in_ecount_z_opt(cData) LPCWSTR* rgwzData,
1007 __in int nRecommendation,
1008 __inout int* pResult
1009 )
1010 {
1011#ifdef DEBUG
1012 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnError() - package: %ls, code: %d, ui hint: %d, message: %ls", wzPackageId, dwCode, dwUIHint, wzError);
1013#endif
1014
1015 HRESULT hr = S_OK;
1016 int nResult = *pResult;
1017 LPWSTR sczError = NULL;
1018
1019 if (BOOTSTRAPPER_DISPLAY_EMBEDDED == m_commandDisplay)
1020 {
1021 hr = m_pEngine->SendEmbeddedError(dwCode, wzError, dwUIHint, &nResult);
1022 if (FAILED(hr))
1023 {
1024 nResult = IDERROR;
1025 }
1026 }
1027 else if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay)
1028 {
1029 // If this is an authentication failure, let the engine try to handle it for us.
1030 if (BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER == errorType || BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY == errorType)
1031 {
1032 nResult = IDTRYAGAIN;
1033 }
1034 else // show a generic error message box.
1035 {
1036 BalRetryErrorOccurred(wzPackageId, dwCode);
1037
1038 if (!m_fShowingInternalUiThisPackage)
1039 {
1040 // If no error message was provided, use the error code to try and get an error message.
1041 if (!wzError || !*wzError || BOOTSTRAPPER_ERROR_TYPE_WINDOWS_INSTALLER != errorType)
1042 {
1043 hr = StrAllocFromError(&sczError, dwCode, NULL);
1044 if (FAILED(hr) || !sczError || !*sczError)
1045 {
1046 StrAllocFormatted(&sczError, L"0x%x", dwCode);
1047 }
1048
1049 hr = S_OK;
1050 }
1051
1052 nResult = ::MessageBoxW(m_hWnd, sczError ? sczError : wzError, m_pTheme->sczCaption, dwUIHint);
1053 }
1054 }
1055
1056 SetProgressState(HRESULT_FROM_WIN32(dwCode));
1057 }
1058 else // just take note of the error code and let things continue.
1059 {
1060 BalRetryErrorOccurred(wzPackageId, dwCode);
1061 }
1062
1063 ReleaseStr(sczError);
1064
1065 *pResult = nResult;
1066
1067#ifdef DEBUG
1068 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnError() - package: %ls, hr: 0x%0x, result: %d", wzPackageId, hr, nResult);
1069#endif
1070
1071 return FAILED(hr) ? hr : __super::OnError(errorType, wzPackageId, dwCode, wzError, dwUIHint, cData, rgwzData, nRecommendation, pResult);
1072 }
1073
1074
1075 virtual STDMETHODIMP OnExecuteMsiMessage(
1076 __in_z LPCWSTR wzPackageId,
1077 __in INSTALLMESSAGE messageType,
1078 __in DWORD dwUIHint,
1079 __in_z LPCWSTR wzMessage,
1080 __in DWORD cData,
1081 __in_ecount_z_opt(cData) LPCWSTR* rgwzData,
1082 __in int nRecommendation,
1083 __inout int* pResult
1084 )
1085 {
1086#ifdef DEBUG
1087 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnExecuteMsiMessage() - package: %ls, message: %ls", wzPackageId, wzMessage);
1088#endif
1089
1090 if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay && (INSTALLMESSAGE_WARNING == messageType || INSTALLMESSAGE_USER == messageType))
1091 {
1092 if (!m_fShowingInternalUiThisPackage)
1093 {
1094 int nResult = ::MessageBoxW(m_hWnd, wzMessage, m_pTheme->sczCaption, dwUIHint);
1095
1096 *pResult = nResult;
1097
1098 return __super::OnExecuteMsiMessage(wzPackageId, messageType, dwUIHint, wzMessage, cData, rgwzData, nRecommendation, pResult);
1099 }
1100 }
1101
1102 if (INSTALLMESSAGE_ACTIONSTART == messageType)
1103 {
1104 ThemeSetTextControl(m_pControlExecuteProgressActionDataText, wzMessage);
1105 }
1106
1107 return __super::OnExecuteMsiMessage(wzPackageId, messageType, dwUIHint, wzMessage, cData, rgwzData, nRecommendation, pResult);
1108 }
1109
1110
1111 virtual STDMETHODIMP OnProgress(
1112 __in DWORD dwProgressPercentage,
1113 __in DWORD dwOverallProgressPercentage,
1114 __inout BOOL* pfCancel
1115 )
1116 {
1117 WCHAR wzProgress[5] = { };
1118
1119#ifdef DEBUG
1120 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnProgress() - progress: %u%%, overall progress: %u%%", dwProgressPercentage, dwOverallProgressPercentage);
1121#endif
1122
1123 ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallProgressPercentage);
1124 ThemeSetTextControl(m_pControlOverallProgressText, wzProgress);
1125
1126 ThemeSetProgressControl(m_pControlOverallProgressbar, dwOverallProgressPercentage);
1127 SetTaskbarButtonProgress(dwOverallProgressPercentage);
1128
1129 return __super::OnProgress(dwProgressPercentage, dwOverallProgressPercentage, pfCancel);
1130 }
1131
1132
1133 virtual STDMETHODIMP OnExecutePackageBegin(
1134 __in_z LPCWSTR wzPackageId,
1135 __in BOOL fExecute,
1136 __in BOOTSTRAPPER_ACTION_STATE action,
1137 __in INSTALLUILEVEL uiLevel,
1138 __in BOOL fDisableExternalUiHandler,
1139 __inout BOOL* pfCancel
1140 )
1141 {
1142 HRESULT hr = S_OK;
1143 LPWSTR sczFormattedString = NULL;
1144 BOOL fShowingInternalUiThisPackage = FALSE;
1145
1146 m_fStartedExecution = TRUE;
1147
1148 if (wzPackageId && *wzPackageId)
1149 {
1150 BAL_INFO_PACKAGE* pPackage = NULL;
1151 BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
1152
1153 LPCWSTR wz = wzPackageId;
1154 if (pPackage)
1155 {
1156 LOC_STRING* pLocString = NULL;
1157
1158 switch (pPackage->type)
1159 {
1160 case BAL_INFO_PACKAGE_TYPE_BUNDLE_ADDON:
1161 LocGetString(m_pWixLoc, L"#(loc.ExecuteAddonRelatedBundleMessage)", &pLocString);
1162 break;
1163
1164 case BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH:
1165 LocGetString(m_pWixLoc, L"#(loc.ExecutePatchRelatedBundleMessage)", &pLocString);
1166 break;
1167
1168 case BAL_INFO_PACKAGE_TYPE_BUNDLE_UPGRADE:
1169 LocGetString(m_pWixLoc, L"#(loc.ExecuteUpgradeRelatedBundleMessage)", &pLocString);
1170 break;
1171 }
1172
1173 if (pLocString)
1174 {
1175 // If the wix developer is showing a hidden variable in the UI, then obviously they don't care about keeping it safe
1176 // so don't go down the rabbit hole of making sure that this is securely freed.
1177 BalFormatString(pLocString->wzText, &sczFormattedString);
1178 }
1179
1180 wz = sczFormattedString ? sczFormattedString : pPackage->sczDisplayName ? pPackage->sczDisplayName : wzPackageId;
1181 }
1182
1183 fShowingInternalUiThisPackage = INSTALLUILEVEL_NONE != (INSTALLUILEVEL_NONE & uiLevel);
1184
1185 ThemeSetTextControl(m_pControlExecuteProgressPackageText, wz);
1186 ThemeSetTextControl(m_pControlOverallProgressPackageText, wz);
1187 }
1188
1189 ::EnterCriticalSection(&m_csShowingInternalUiThisPackage);
1190 m_fShowingInternalUiThisPackage = fShowingInternalUiThisPackage;
1191 hr = __super::OnExecutePackageBegin(wzPackageId, fExecute, action, uiLevel, fDisableExternalUiHandler, pfCancel);
1192 ::LeaveCriticalSection(&m_csShowingInternalUiThisPackage);
1193
1194 ReleaseStr(sczFormattedString);
1195 return hr;
1196 }
1197
1198
1199 virtual STDMETHODIMP OnExecuteProgress(
1200 __in_z LPCWSTR wzPackageId,
1201 __in DWORD dwProgressPercentage,
1202 __in DWORD dwOverallProgressPercentage,
1203 __inout BOOL* pfCancel
1204 )
1205 {
1206 WCHAR wzProgress[5] = { };
1207
1208#ifdef DEBUG
1209 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnExecuteProgress() - package: %ls, progress: %u%%, overall progress: %u%%", wzPackageId, dwProgressPercentage, dwOverallProgressPercentage);
1210#endif
1211
1212 ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallProgressPercentage);
1213 ThemeSetTextControl(m_pControlExecuteProgressText, wzProgress);
1214
1215 ThemeSetProgressControl(m_pControlExecuteProgressbar, dwOverallProgressPercentage);
1216
1217 m_dwCalculatedExecuteProgress = dwOverallProgressPercentage * (100 - WIXSTDBA_ACQUIRE_PERCENTAGE) / 100;
1218 ThemeSetProgressControl(m_pControlOverallCalculatedProgressbar, m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress);
1219
1220 SetTaskbarButtonProgress(m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress);
1221
1222 return __super::OnExecuteProgress(wzPackageId, dwProgressPercentage, dwOverallProgressPercentage, pfCancel);
1223 }
1224
1225
1226 virtual STDMETHODIMP OnExecuteFilesInUse(
1227 __in_z LPCWSTR wzPackageId,
1228 __in DWORD cFiles,
1229 __in_ecount_z(cFiles) LPCWSTR* rgwzFiles,
1230 __in int nRecommendation,
1231 __in BOOTSTRAPPER_FILES_IN_USE_TYPE source,
1232 __inout int* pResult
1233 )
1234 {
1235
1236 if (!m_fShowingInternalUiThisPackage && wzPackageId && *wzPackageId)
1237 {
1238 BalLog(BOOTSTRAPPER_LOG_LEVEL_VERBOSE, "Package %ls has %d applications holding files in use.", wzPackageId, cFiles);
1239
1240 switch (source)
1241 {
1242 case BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI:
1243 if (m_fShowStandardFilesInUse)
1244 {
1245 return ShowMsiFilesInUse(cFiles, rgwzFiles, source, pResult);
1246 }
1247 break;
1248 case BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI_RM:
1249 if (m_fShowRMFilesInUse)
1250 {
1251 return ShowMsiFilesInUse(cFiles, rgwzFiles, source, pResult);
1252 }
1253 break;
1254 case BOOTSTRAPPER_FILES_IN_USE_TYPE_NETFX:
1255 if (m_fShowNetfxFilesInUse)
1256 {
1257 return ShowNetfxFilesInUse(cFiles, rgwzFiles, pResult);
1258 }
1259 break;
1260 }
1261 }
1262
1263 return __super::OnExecuteFilesInUse(wzPackageId, cFiles, rgwzFiles, nRecommendation, source, pResult);
1264 }
1265
1266
1267 virtual STDMETHODIMP OnExecutePackageComplete(
1268 __in_z LPCWSTR wzPackageId,
1269 __in HRESULT hrStatus,
1270 __in BOOTSTRAPPER_APPLY_RESTART restart,
1271 __in BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation,
1272 __inout BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION* pAction
1273 )
1274 {
1275 HRESULT hr = S_OK;
1276 SetProgressState(hrStatus);
1277
1278 hr = __super::OnExecutePackageComplete(wzPackageId, hrStatus, restart, recommendation, pAction);
1279
1280 if (m_fPrereq && BOOTSTRAPPER_APPLY_RESTART_NONE != restart)
1281 {
1282 BAL_INFO_PACKAGE* pPackage = NULL;
1283 HRESULT hrPrereq = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
1284
1285 // If the prerequisite required a restart (any restart) then do an immediate
1286 // restart to ensure that the bundle will get launched again post reboot.
1287 if (SUCCEEDED(hrPrereq) && pPackage->fPrereqPackage)
1288 {
1289 *pAction = BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_RESTART;
1290 }
1291 }
1292
1293 return hr;
1294 }
1295
1296
1297 virtual STDMETHODIMP OnExecuteComplete(
1298 __in HRESULT hrStatus
1299 )
1300 {
1301 HRESULT hr = S_OK;
1302
1303 ThemeSetTextControl(m_pControlExecuteProgressPackageText, L"");
1304 ThemeSetTextControl(m_pControlExecuteProgressActionDataText, L"");
1305 ThemeSetTextControl(m_pControlOverallProgressPackageText, L"");
1306 ThemeControlEnable(m_pControlProgressCancelButton, FALSE); // no more cancel.
1307 m_fShowingInternalUiThisPackage = FALSE;
1308
1309 SetState(WIXSTDBA_STATE_EXECUTED, S_OK); // we always return success here and let OnApplyComplete() deal with the error.
1310 SetProgressState(hrStatus);
1311
1312 return hr;
1313 }
1314
1315
1316 virtual STDMETHODIMP OnCacheAcquireResolving(
1317 __in_z_opt LPCWSTR wzPackageOrContainerId,
1318 __in_z_opt LPCWSTR wzPayloadId,
1319 __in_z LPCWSTR* rgSearchPaths,
1320 __in DWORD /*cSearchPaths*/,
1321 __in BOOL /*fFoundLocal*/,
1322 __in DWORD dwRecommendedSearchPath,
1323 __in_z_opt LPCWSTR /*wzDownloadUrl*/,
1324 __in_z_opt LPCWSTR /*wzPayloadContainerId*/,
1325 __in BOOTSTRAPPER_CACHE_RESOLVE_OPERATION /*recommendation*/,
1326 __inout DWORD* /*pdwChosenSearchPath*/,
1327 __inout BOOTSTRAPPER_CACHE_RESOLVE_OPERATION* pAction,
1328 __inout BOOL* pfCancel
1329 )
1330 {
1331 HRESULT hr = S_OK;
1332 LPWSTR sczPath = NULL;
1333
1334 if (BOOTSTRAPPER_CACHE_RESOLVE_NONE == *pAction && BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay) // prompt to change the source location.
1335 {
1336 static COMDLG_FILTERSPEC vrgFilters[] =
1337 {
1338 { L"All Files", L"*.*" },
1339 };
1340
1341 hr = WnduShowOpenFileDialog(m_hWnd, TRUE, TRUE, m_pTheme->sczCaption, vrgFilters, countof(vrgFilters), 1, rgSearchPaths[dwRecommendedSearchPath], &sczPath);
1342 if (SUCCEEDED(hr))
1343 {
1344 hr = m_pEngine->SetLocalSource(wzPackageOrContainerId, wzPayloadId, sczPath);
1345 *pAction = BOOTSTRAPPER_CACHE_RESOLVE_RETRY;
1346 }
1347 else
1348 {
1349 *pfCancel = TRUE;
1350 }
1351 }
1352 // else there's nothing more we can do in non-interactive mode
1353
1354 *pfCancel |= CheckCanceled();
1355
1356 ReleaseStr(sczPath);
1357
1358 return hr;
1359 }
1360
1361 virtual STDMETHODIMP OnApplyComplete(
1362 __in HRESULT hrStatus,
1363 __in BOOTSTRAPPER_APPLY_RESTART restart,
1364 __in BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation,
1365 __inout BOOTSTRAPPER_APPLYCOMPLETE_ACTION* pAction
1366 )
1367 {
1368 HRESULT hr = S_OK;
1369
1370 __super::OnApplyComplete(hrStatus, restart, recommendation, pAction);
1371
1372 m_restartResult = restart; // remember the restart result so we return the correct error code no matter what the user chooses to do in the UI.
1373 m_fRestartRequired = BOOTSTRAPPER_APPLY_RESTART_NONE != restart;
1374 BalSetStringVariable(WIXSTDBA_VARIABLE_RESTART_REQUIRED, m_fRestartRequired ? L"1" : NULL, FALSE);
1375
1376 m_fShouldRestart = m_fRestartRequired && BAL_INFO_RESTART_NEVER < m_BalInfoCommand.restart;
1377
1378 // Automatically restart if we're not displaying a UI or the command line said to always allow restarts.
1379 m_fAllowRestart = m_fShouldRestart && (BOOTSTRAPPER_DISPLAY_FULL > m_commandDisplay || BAL_INFO_RESTART_PROMPT < m_BalInfoCommand.restart);
1380
1381 if (m_fPrereq)
1382 {
1383 m_fPrereqInstalled = SUCCEEDED(hrStatus);
1384 }
1385
1386 // If we are showing UI, wait a beat before moving to the final screen.
1387 if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay)
1388 {
1389 ::Sleep(250);
1390 }
1391
1392 SetState(WIXSTDBA_STATE_APPLIED, hrStatus);
1393 SetTaskbarButtonProgress(100); // show full progress bar, green, yellow, or red
1394
1395 *pAction = BOOTSTRAPPER_APPLYCOMPLETE_ACTION_NONE;
1396
1397 return hr;
1398 }
1399
1400 virtual STDMETHODIMP OnLaunchApprovedExeComplete(
1401 __in HRESULT hrStatus,
1402 __in DWORD /*processId*/
1403 )
1404 {
1405 HRESULT hr = S_OK;
1406
1407 if (HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) == hrStatus)
1408 {
1409 //try with ShelExec next time
1410 OnClickLaunchButton();
1411 }
1412 else
1413 {
1414 ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0);
1415 }
1416
1417 return hr;
1418 }
1419
1420
1421 virtual STDMETHODIMP OnElevateComplete(
1422 __in HRESULT hrStatus
1423 )
1424 {
1425 if (m_fElevatingForRestart)
1426 {
1427 m_fElevatingForRestart = FALSE;
1428
1429 if (SUCCEEDED(hrStatus))
1430 {
1431 m_fAllowRestart = TRUE;
1432
1433 ::SendMessageW(m_hWnd, WM_CLOSE, 0, 0);
1434 }
1435 // else if failed then OnError showed the user an error message box
1436 }
1437
1438 return __super::OnElevateComplete(hrStatus);
1439 }
1440
1441
1442 virtual STDMETHODIMP_(void) BAProcFallback(
1443 __in BOOTSTRAPPER_APPLICATION_MESSAGE message,
1444 __in const LPVOID pvArgs,
1445 __inout LPVOID pvResults,
1446 __inout HRESULT* phr
1447 )
1448 {
1449 if (!m_pfnBAFunctionsProc || FAILED(*phr))
1450 {
1451 return;
1452 }
1453
1454 // Always log before and after so we don't get blamed when BAFunctions changes something.
1455 switch (message)
1456 {
1457 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCREATE:
1458 // Functions do not get ONCREATE, they get these parameters when created directly.
1459 break;
1460 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDESTROY:
1461 OnDestroyFallback(reinterpret_cast<BA_ONDESTROY_ARGS*>(pvArgs), reinterpret_cast<BA_ONDESTROY_RESULTS*>(pvResults));
1462 break;
1463 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP:
1464 OnStartupFallback(reinterpret_cast<BA_ONSTARTUP_ARGS*>(pvArgs), reinterpret_cast<BA_ONSTARTUP_RESULTS*>(pvResults));
1465 break;
1466 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN:
1467 OnShutdownFallback(reinterpret_cast<BA_ONSHUTDOWN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSHUTDOWN_RESULTS*>(pvResults));
1468 break;
1469 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN:
1470 OnDetectBeginFallback(reinterpret_cast<BA_ONDETECTBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTBEGIN_RESULTS*>(pvResults));
1471 break;
1472 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPLETE:
1473 OnDetectCompleteFallback(reinterpret_cast<BA_ONDETECTCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTCOMPLETE_RESULTS*>(pvResults));
1474 break;
1475 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANBEGIN:
1476 OnPlanBeginFallback(reinterpret_cast<BA_ONPLANBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANBEGIN_RESULTS*>(pvResults));
1477 break;
1478 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE:
1479 OnPlanCompleteFallback(reinterpret_cast<BA_ONPLANCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANCOMPLETE_RESULTS*>(pvResults));
1480 break;
1481 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE:
1482 OnDetectForwardCompatibleBundleFallback(reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS*>(pvResults));
1483 break;
1484 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN:
1485 OnDetectUpdateBeginFallback(reinterpret_cast<BA_ONDETECTUPDATEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTUPDATEBEGIN_RESULTS*>(pvResults));
1486 break;
1487 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE:
1488 OnDetectUpdateFallback(reinterpret_cast<BA_ONDETECTUPDATE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTUPDATE_RESULTS*>(pvResults));
1489 break;
1490 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATECOMPLETE:
1491 OnDetectUpdateCompleteFallback(reinterpret_cast<BA_ONDETECTUPDATECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTUPDATECOMPLETE_RESULTS*>(pvResults));
1492 break;
1493 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE:
1494 OnDetectRelatedBundleFallback(reinterpret_cast<BA_ONDETECTRELATEDBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTRELATEDBUNDLE_RESULTS*>(pvResults));
1495 break;
1496 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGEBEGIN:
1497 OnDetectPackageBeginFallback(reinterpret_cast<BA_ONDETECTPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTPACKAGEBEGIN_RESULTS*>(pvResults));
1498 break;
1499 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDMSIPACKAGE:
1500 OnDetectRelatedMsiPackageFallback(reinterpret_cast<BA_ONDETECTRELATEDMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTRELATEDMSIPACKAGE_RESULTS*>(pvResults));
1501 break;
1502 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPATCHTARGET:
1503 OnDetectPatchTargetFallback(reinterpret_cast<BA_ONDETECTPATCHTARGET_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTPATCHTARGET_RESULTS*>(pvResults));
1504 break;
1505 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTMSIFEATURE:
1506 OnDetectMsiFeatureFallback(reinterpret_cast<BA_ONDETECTMSIFEATURE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTMSIFEATURE_RESULTS*>(pvResults));
1507 break;
1508 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGECOMPLETE:
1509 OnDetectPackageCompleteFallback(reinterpret_cast<BA_ONDETECTPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTPACKAGECOMPLETE_RESULTS*>(pvResults));
1510 break;
1511 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE:
1512 OnPlanRelatedBundleFallback(reinterpret_cast<BA_ONPLANRELATEDBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANRELATEDBUNDLE_RESULTS*>(pvResults));
1513 break;
1514 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGEBEGIN:
1515 OnPlanPackageBeginFallback(reinterpret_cast<BA_ONPLANPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANPACKAGEBEGIN_RESULTS*>(pvResults));
1516 break;
1517 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPATCHTARGET:
1518 OnPlanPatchTargetFallback(reinterpret_cast<BA_ONPLANPATCHTARGET_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANPATCHTARGET_RESULTS*>(pvResults));
1519 break;
1520 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIFEATURE:
1521 OnPlanMsiFeatureFallback(reinterpret_cast<BA_ONPLANMSIFEATURE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANMSIFEATURE_RESULTS*>(pvResults));
1522 break;
1523 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGECOMPLETE:
1524 OnPlanPackageCompleteFallback(reinterpret_cast<BA_ONPLANPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANPACKAGECOMPLETE_RESULTS*>(pvResults));
1525 break;
1526 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYBEGIN:
1527 OnApplyBeginFallback(reinterpret_cast<BA_ONAPPLYBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONAPPLYBEGIN_RESULTS*>(pvResults));
1528 break;
1529 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATEBEGIN:
1530 OnElevateBeginFallback(reinterpret_cast<BA_ONELEVATEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONELEVATEBEGIN_RESULTS*>(pvResults));
1531 break;
1532 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATECOMPLETE:
1533 OnElevateCompleteFallback(reinterpret_cast<BA_ONELEVATECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONELEVATECOMPLETE_RESULTS*>(pvResults));
1534 break;
1535 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPROGRESS:
1536 OnProgressFallback(reinterpret_cast<BA_ONPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONPROGRESS_RESULTS*>(pvResults));
1537 break;
1538 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONERROR:
1539 OnErrorFallback(reinterpret_cast<BA_ONERROR_ARGS*>(pvArgs), reinterpret_cast<BA_ONERROR_RESULTS*>(pvResults));
1540 break;
1541 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERBEGIN:
1542 OnRegisterBeginFallback(reinterpret_cast<BA_ONREGISTERBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONREGISTERBEGIN_RESULTS*>(pvResults));
1543 break;
1544 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERCOMPLETE:
1545 OnRegisterCompleteFallback(reinterpret_cast<BA_ONREGISTERCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONREGISTERCOMPLETE_RESULTS*>(pvResults));
1546 break;
1547 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEBEGIN:
1548 OnCacheBeginFallback(reinterpret_cast<BA_ONCACHEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEBEGIN_RESULTS*>(pvResults));
1549 break;
1550 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN:
1551 OnCachePackageBeginFallback(reinterpret_cast<BA_ONCACHEPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPACKAGEBEGIN_RESULTS*>(pvResults));
1552 break;
1553 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN:
1554 OnCacheAcquireBeginFallback(reinterpret_cast<BA_ONCACHEACQUIREBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIREBEGIN_RESULTS*>(pvResults));
1555 break;
1556 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS:
1557 OnCacheAcquireProgressFallback(reinterpret_cast<BA_ONCACHEACQUIREPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIREPROGRESS_RESULTS*>(pvResults));
1558 break;
1559 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRERESOLVING:
1560 OnCacheAcquireResolvingFallback(reinterpret_cast<BA_ONCACHEACQUIRERESOLVING_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIRERESOLVING_RESULTS*>(pvResults));
1561 break;
1562 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE:
1563 OnCacheAcquireCompleteFallback(reinterpret_cast<BA_ONCACHEACQUIRECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIRECOMPLETE_RESULTS*>(pvResults));
1564 break;
1565 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN:
1566 OnCacheVerifyBeginFallback(reinterpret_cast<BA_ONCACHEVERIFYBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEVERIFYBEGIN_RESULTS*>(pvResults));
1567 break;
1568 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE:
1569 OnCacheVerifyCompleteFallback(reinterpret_cast<BA_ONCACHEVERIFYCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEVERIFYCOMPLETE_RESULTS*>(pvResults));
1570 break;
1571 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGECOMPLETE:
1572 OnCachePackageCompleteFallback(reinterpret_cast<BA_ONCACHEPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPACKAGECOMPLETE_RESULTS*>(pvResults));
1573 break;
1574 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECOMPLETE:
1575 OnCacheCompleteFallback(reinterpret_cast<BA_ONCACHECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECOMPLETE_RESULTS*>(pvResults));
1576 break;
1577 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEBEGIN:
1578 OnExecuteBeginFallback(reinterpret_cast<BA_ONEXECUTEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEBEGIN_RESULTS*>(pvResults));
1579 break;
1580 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGEBEGIN:
1581 OnExecutePackageBeginFallback(reinterpret_cast<BA_ONEXECUTEPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPACKAGEBEGIN_RESULTS*>(pvResults));
1582 break;
1583 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPATCHTARGET:
1584 OnExecutePatchTargetFallback(reinterpret_cast<BA_ONEXECUTEPATCHTARGET_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPATCHTARGET_RESULTS*>(pvResults));
1585 break;
1586 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROGRESS:
1587 OnExecuteProgressFallback(reinterpret_cast<BA_ONEXECUTEPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPROGRESS_RESULTS*>(pvResults));
1588 break;
1589 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEMSIMESSAGE:
1590 OnExecuteMsiMessageFallback(reinterpret_cast<BA_ONEXECUTEMSIMESSAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEMSIMESSAGE_RESULTS*>(pvResults));
1591 break;
1592 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEFILESINUSE:
1593 OnExecuteFilesInUseFallback(reinterpret_cast<BA_ONEXECUTEFILESINUSE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEFILESINUSE_RESULTS*>(pvResults));
1594 break;
1595 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGECOMPLETE:
1596 OnExecutePackageCompleteFallback(reinterpret_cast<BA_ONEXECUTEPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPACKAGECOMPLETE_RESULTS*>(pvResults));
1597 break;
1598 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTECOMPLETE:
1599 OnExecuteCompleteFallback(reinterpret_cast<BA_ONEXECUTECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTECOMPLETE_RESULTS*>(pvResults));
1600 break;
1601 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERBEGIN:
1602 OnUnregisterBeginFallback(reinterpret_cast<BA_ONUNREGISTERBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONUNREGISTERBEGIN_RESULTS*>(pvResults));
1603 break;
1604 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERCOMPLETE:
1605 OnUnregisterCompleteFallback(reinterpret_cast<BA_ONUNREGISTERCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONUNREGISTERCOMPLETE_RESULTS*>(pvResults));
1606 break;
1607 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYCOMPLETE:
1608 OnApplyCompleteFallback(reinterpret_cast<BA_ONAPPLYCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONAPPLYCOMPLETE_RESULTS*>(pvResults));
1609 break;
1610 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN:
1611 OnLaunchApprovedExeBeginFallback(reinterpret_cast<BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS*>(pvResults));
1612 break;
1613 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE:
1614 OnLaunchApprovedExeCompleteFallback(reinterpret_cast<BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS*>(pvResults));
1615 break;
1616 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE:
1617 OnPlanMsiPackageFallback(reinterpret_cast<BA_ONPLANMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANMSIPACKAGE_RESULTS*>(pvResults));
1618 break;
1619 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN:
1620 OnBeginMsiTransactionBeginFallback(reinterpret_cast<BA_ONBEGINMSITRANSACTIONBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS*>(pvResults));
1621 break;
1622 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE:
1623 OnBeginMsiTransactionCompleteFallback(reinterpret_cast<BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS*>(pvResults));
1624 break;
1625 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN:
1626 OnCommitMsiTransactionBeginFallback(reinterpret_cast<BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS*>(pvResults));
1627 break;
1628 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE:
1629 OnCommitMsiTransactionCompleteFallback(reinterpret_cast<BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS*>(pvResults));
1630 break;
1631 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN:
1632 OnRollbackMsiTransactionBeginFallback(reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS*>(pvResults));
1633 break;
1634 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE:
1635 OnRollbackMsiTransactionCompleteFallback(reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS*>(pvResults));
1636 break;
1637 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN:
1638 OnPauseAutomaticUpdatesBeginFallback(reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESBEGIN_RESULTS*>(pvResults));
1639 break;
1640 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE:
1641 OnPauseAutomaticUpdatesCompleteFallback(reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_RESULTS*>(pvResults));
1642 break;
1643 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN:
1644 OnSystemRestorePointBeginFallback(reinterpret_cast<BA_ONSYSTEMRESTOREPOINTBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSYSTEMRESTOREPOINTBEGIN_RESULTS*>(pvResults));
1645 break;
1646 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE:
1647 OnSystemRestorePointCompleteFallback(reinterpret_cast<BA_ONSYSTEMRESTOREPOINTCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS*>(pvResults));
1648 break;
1649 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE:
1650 OnPlannedPackageFallback(reinterpret_cast<BA_ONPLANNEDPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANNEDPACKAGE_RESULTS*>(pvResults));
1651 break;
1652 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYPROGRESS:
1653 OnCacheVerifyProgressFallback(reinterpret_cast<BA_ONCACHEVERIFYPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEVERIFYPROGRESS_RESULTS*>(pvResults));
1654 break;
1655 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN:
1656 OnCacheContainerOrPayloadVerifyBeginFallback(reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS*>(pvResults));
1657 break;
1658 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE:
1659 OnCacheContainerOrPayloadVerifyCompleteFallback(reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS*>(pvResults));
1660 break;
1661 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS:
1662 OnCacheContainerOrPayloadVerifyProgressFallback(reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS*>(pvResults));
1663 break;
1664 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN:
1665 OnCachePayloadExtractBeginFallback(reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS*>(pvResults));
1666 break;
1667 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE:
1668 OnCachePayloadExtractCompleteFallback(reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS*>(pvResults));
1669 break;
1670 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS:
1671 OnCachePayloadExtractProgressFallback(reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS*>(pvResults));
1672 break;
1673 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANROLLBACKBOUNDARY:
1674 OnPlanRollbackBoundaryFallback(reinterpret_cast<BA_ONPLANROLLBACKBOUNDARY_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANROLLBACKBOUNDARY_RESULTS*>(pvResults));
1675 break;
1676 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE:
1677 OnDetectCompatibleMsiPackageFallback(reinterpret_cast<BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS*>(pvResults));
1678 break;
1679 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN:
1680 OnPlanCompatibleMsiPackageBeginFallback(reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS*>(pvResults));
1681 break;
1682 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE:
1683 OnPlanCompatibleMsiPackageCompleteFallback(reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS*>(pvResults));
1684 break;
1685 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE:
1686 OnPlannedCompatiblePackageFallback(reinterpret_cast<BA_ONPLANNEDCOMPATIBLEPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANNEDCOMPATIBLEPACKAGE_RESULTS*>(pvResults));
1687 break;
1688 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE:
1689 OnPlanRestoreRelatedBundleFallback(reinterpret_cast<BA_ONPLANRESTORERELATEDBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANRESTORERELATEDBUNDLE_RESULTS*>(pvResults));
1690 break;
1691 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE:
1692 OnPlanRelatedBundleTypeFallback(reinterpret_cast<BA_ONPLANRELATEDBUNDLETYPE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANRELATEDBUNDLETYPE_RESULTS*>(pvResults));
1693 break;
1694 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYDOWNGRADE:
1695 OnApplyDowngradeFallback(reinterpret_cast<BA_ONAPPLYDOWNGRADE_ARGS*>(pvArgs), reinterpret_cast<BA_ONAPPLYDOWNGRADE_RESULTS*>(pvResults));
1696 break;
1697 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE:
1698 OnDetectRelatedBundlePackageFallback(reinterpret_cast<BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS*>(pvResults));
1699 break;
1700 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE:
1701 OnCachePackageNonVitalValidationFailureFallback(reinterpret_cast<BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_RESULTS*>(pvResults));
1702 break;
1703 default:
1704#ifdef DEBUG
1705 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: Forwarding unknown BA message: %d", message);
1706#endif
1707 m_pfnBAFunctionsProc((BA_FUNCTIONS_MESSAGE)message, pvArgs, pvResults, m_pvBAFunctionsProcContext);
1708 break;
1709 }
1710 }
1711
1712
1713private: // privates
1714 void OnDestroyFallback(
1715 __in BA_ONDESTROY_ARGS* pArgs,
1716 __inout BA_ONDESTROY_RESULTS* pResults
1717 )
1718 {
1719 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDESTROY, pArgs, pResults, m_pvBAFunctionsProcContext);
1720 }
1721
1722 void OnStartupFallback(
1723 __in BA_ONSTARTUP_ARGS* pArgs,
1724 __inout BA_ONSTARTUP_RESULTS* pResults
1725 )
1726 {
1727 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSTARTUP, pArgs, pResults, m_pvBAFunctionsProcContext);
1728 }
1729
1730 void OnShutdownFallback(
1731 __in BA_ONSHUTDOWN_ARGS* pArgs,
1732 __inout BA_ONSHUTDOWN_RESULTS* pResults
1733 )
1734 {
1735 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSHUTDOWN, pArgs, pResults, m_pvBAFunctionsProcContext);
1736 }
1737
1738 void OnDetectBeginFallback(
1739 __in BA_ONDETECTBEGIN_ARGS* pArgs,
1740 __inout BA_ONDETECTBEGIN_RESULTS* pResults
1741 )
1742 {
1743 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1744 }
1745
1746 void OnDetectCompleteFallback(
1747 __in BA_ONDETECTCOMPLETE_ARGS* pArgs,
1748 __inout BA_ONDETECTCOMPLETE_RESULTS* pResults
1749 )
1750 {
1751 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1752 }
1753
1754 void OnPlanBeginFallback(
1755 __in BA_ONPLANBEGIN_ARGS* pArgs,
1756 __inout BA_ONPLANBEGIN_RESULTS* pResults
1757 )
1758 {
1759 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1760 }
1761
1762 void OnPlanCompleteFallback(
1763 __in BA_ONPLANCOMPLETE_ARGS* pArgs,
1764 __inout BA_ONPLANCOMPLETE_RESULTS* pResults
1765 )
1766 {
1767 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1768 }
1769
1770 void OnDetectForwardCompatibleBundleFallback(
1771 __in BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs,
1772 __inout BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults
1773 )
1774 {
1775 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, pArgs, pResults, m_pvBAFunctionsProcContext);
1776 }
1777
1778 void OnDetectUpdateBeginFallback(
1779 __in BA_ONDETECTUPDATEBEGIN_ARGS* pArgs,
1780 __inout BA_ONDETECTUPDATEBEGIN_RESULTS* pResults
1781 )
1782 {
1783 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTUPDATEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1784 }
1785
1786 void OnDetectUpdateFallback(
1787 __in BA_ONDETECTUPDATE_ARGS* pArgs,
1788 __inout BA_ONDETECTUPDATE_RESULTS* pResults
1789 )
1790 {
1791 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTUPDATE, pArgs, pResults, m_pvBAFunctionsProcContext);
1792 }
1793
1794 void OnDetectUpdateCompleteFallback(
1795 __in BA_ONDETECTUPDATECOMPLETE_ARGS* pArgs,
1796 __inout BA_ONDETECTUPDATECOMPLETE_RESULTS* pResults
1797 )
1798 {
1799 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTUPDATECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1800 }
1801
1802 void OnDetectRelatedBundleFallback(
1803 __in BA_ONDETECTRELATEDBUNDLE_ARGS* pArgs,
1804 __inout BA_ONDETECTRELATEDBUNDLE_RESULTS* pResults
1805 )
1806 {
1807 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLE, pArgs, pResults, m_pvBAFunctionsProcContext);
1808 }
1809
1810 void OnDetectPackageBeginFallback(
1811 __in BA_ONDETECTPACKAGEBEGIN_ARGS* pArgs,
1812 __inout BA_ONDETECTPACKAGEBEGIN_RESULTS* pResults
1813 )
1814 {
1815 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1816 }
1817
1818 void OnDetectRelatedMsiPackageFallback(
1819 __in BA_ONDETECTRELATEDMSIPACKAGE_ARGS* pArgs,
1820 __inout BA_ONDETECTRELATEDMSIPACKAGE_RESULTS* pResults
1821 )
1822 {
1823 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDMSIPACKAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
1824 }
1825
1826 void OnDetectPatchTargetFallback(
1827 __in BA_ONDETECTPATCHTARGET_ARGS* pArgs,
1828 __inout BA_ONDETECTPATCHTARGET_RESULTS* pResults
1829 )
1830 {
1831 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTPATCHTARGET, pArgs, pResults, m_pvBAFunctionsProcContext);
1832 }
1833
1834 void OnDetectMsiFeatureFallback(
1835 __in BA_ONDETECTMSIFEATURE_ARGS* pArgs,
1836 __inout BA_ONDETECTMSIFEATURE_RESULTS* pResults
1837 )
1838 {
1839 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTMSIFEATURE, pArgs, pResults, m_pvBAFunctionsProcContext);
1840 }
1841
1842 void OnDetectPackageCompleteFallback(
1843 __in BA_ONDETECTPACKAGECOMPLETE_ARGS* pArgs,
1844 __inout BA_ONDETECTPACKAGECOMPLETE_RESULTS* pResults
1845 )
1846 {
1847 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1848 }
1849
1850 void OnPlanRelatedBundleFallback(
1851 __in BA_ONPLANRELATEDBUNDLE_ARGS* pArgs,
1852 __inout BA_ONPLANRELATEDBUNDLE_RESULTS* pResults
1853 )
1854 {
1855 BOOTSTRAPPER_REQUEST_STATE requestedState = pResults->requestedState;
1856 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLE, pArgs, pResults, m_pvBAFunctionsProcContext);
1857 BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_RELATED_BUNDLE, m_hModule, pArgs->wzBundleId, LoggingRequestStateToString(requestedState), LoggingRequestStateToString(pResults->requestedState));
1858 }
1859
1860 void OnPlanRelatedBundleTypeFallback(
1861 __in BA_ONPLANRELATEDBUNDLETYPE_ARGS* pArgs,
1862 __inout BA_ONPLANRELATEDBUNDLETYPE_RESULTS* pResults
1863 )
1864 {
1865 BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE requestedType = pResults->requestedType;
1866 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLETYPE, pArgs, pResults, m_pvBAFunctionsProcContext);
1867 BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_RELATED_BUNDLE_TYPE, m_hModule, pArgs->wzBundleId, LoggingPlanRelationTypeToString(requestedType), LoggingPlanRelationTypeToString(pResults->requestedType));
1868 }
1869
1870 void OnPlanPackageBeginFallback(
1871 __in BA_ONPLANPACKAGEBEGIN_ARGS* pArgs,
1872 __inout BA_ONPLANPACKAGEBEGIN_RESULTS* pResults
1873 )
1874 {
1875 BOOTSTRAPPER_REQUEST_STATE requestedState = pResults->requestedState;
1876 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANPACKAGEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1877 BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_PACKAGE, m_hModule, pArgs->wzPackageId, LoggingRequestStateToString(requestedState), LoggingRequestStateToString(pResults->requestedState));
1878 }
1879
1880 void OnPlanPatchTargetFallback(
1881 __in BA_ONPLANPATCHTARGET_ARGS* pArgs,
1882 __inout BA_ONPLANPATCHTARGET_RESULTS* pResults
1883 )
1884 {
1885 BOOTSTRAPPER_REQUEST_STATE requestedState = pResults->requestedState;
1886 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANPATCHTARGET, pArgs, pResults, m_pvBAFunctionsProcContext);
1887 BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_TARGET_MSI_PACKAGE, m_hModule, pArgs->wzPackageId, pArgs->wzProductCode, LoggingRequestStateToString(requestedState), LoggingRequestStateToString(pResults->requestedState));
1888 }
1889
1890 void OnPlanMsiFeatureFallback(
1891 __in BA_ONPLANMSIFEATURE_ARGS* pArgs,
1892 __inout BA_ONPLANMSIFEATURE_RESULTS* pResults
1893 )
1894 {
1895 BOOTSTRAPPER_FEATURE_STATE requestedState = pResults->requestedState;
1896 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANMSIFEATURE, pArgs, pResults, m_pvBAFunctionsProcContext);
1897 BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_MSI_FEATURE, m_hModule, pArgs->wzPackageId, pArgs->wzFeatureId, LoggingMsiFeatureStateToString(requestedState), LoggingMsiFeatureStateToString(pResults->requestedState));
1898 }
1899
1900 void OnPlanPackageCompleteFallback(
1901 __in BA_ONPLANPACKAGECOMPLETE_ARGS* pArgs,
1902 __inout BA_ONPLANPACKAGECOMPLETE_RESULTS* pResults
1903 )
1904 {
1905 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANPACKAGECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1906 }
1907
1908 void OnPlannedCompatiblePackageFallback(
1909 __in BA_ONPLANNEDCOMPATIBLEPACKAGE_ARGS* pArgs,
1910 __inout BA_ONPLANNEDCOMPATIBLEPACKAGE_RESULTS* pResults
1911 )
1912 {
1913 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
1914 }
1915
1916 void OnPlannedPackageFallback(
1917 __in BA_ONPLANNEDPACKAGE_ARGS* pArgs,
1918 __inout BA_ONPLANNEDPACKAGE_RESULTS* pResults
1919 )
1920 {
1921 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANNEDPACKAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
1922 }
1923
1924 void OnApplyBeginFallback(
1925 __in BA_ONAPPLYBEGIN_ARGS* pArgs,
1926 __inout BA_ONAPPLYBEGIN_RESULTS* pResults
1927 )
1928 {
1929 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONAPPLYBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1930 }
1931
1932 void OnElevateBeginFallback(
1933 __in BA_ONELEVATEBEGIN_ARGS* pArgs,
1934 __inout BA_ONELEVATEBEGIN_RESULTS* pResults
1935 )
1936 {
1937 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONELEVATEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1938 }
1939
1940 void OnElevateCompleteFallback(
1941 __in BA_ONELEVATECOMPLETE_ARGS* pArgs,
1942 __inout BA_ONELEVATECOMPLETE_RESULTS* pResults
1943 )
1944 {
1945 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONELEVATECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1946 }
1947
1948 void OnProgressFallback(
1949 __in BA_ONPROGRESS_ARGS* pArgs,
1950 __inout BA_ONPROGRESS_RESULTS* pResults
1951 )
1952 {
1953 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPROGRESS, pArgs, pResults, m_pvBAFunctionsProcContext);
1954 }
1955
1956 void OnErrorFallback(
1957 __in BA_ONERROR_ARGS* pArgs,
1958 __inout BA_ONERROR_RESULTS* pResults
1959 )
1960 {
1961 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONERROR, pArgs, pResults, m_pvBAFunctionsProcContext);
1962 }
1963
1964 void OnRegisterBeginFallback(
1965 __in BA_ONREGISTERBEGIN_ARGS* pArgs,
1966 __inout BA_ONREGISTERBEGIN_RESULTS* pResults
1967 )
1968 {
1969 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONREGISTERBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1970 }
1971
1972 void OnRegisterCompleteFallback(
1973 __in BA_ONREGISTERCOMPLETE_ARGS* pArgs,
1974 __inout BA_ONREGISTERCOMPLETE_RESULTS* pResults
1975 )
1976 {
1977 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONREGISTERCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1978 }
1979
1980 void OnCacheBeginFallback(
1981 __in BA_ONCACHEBEGIN_ARGS* pArgs,
1982 __inout BA_ONCACHEBEGIN_RESULTS* pResults
1983 )
1984 {
1985 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1986 }
1987
1988 void OnCachePackageBeginFallback(
1989 __in BA_ONCACHEPACKAGEBEGIN_ARGS* pArgs,
1990 __inout BA_ONCACHEPACKAGEBEGIN_RESULTS* pResults
1991 )
1992 {
1993 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1994 }
1995
1996 void OnCacheAcquireBeginFallback(
1997 __in BA_ONCACHEACQUIREBEGIN_ARGS* pArgs,
1998 __inout BA_ONCACHEACQUIREBEGIN_RESULTS* pResults
1999 )
2000 {
2001 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2002 }
2003
2004 void OnCacheAcquireProgressFallback(
2005 __in BA_ONCACHEACQUIREPROGRESS_ARGS* pArgs,
2006 __inout BA_ONCACHEACQUIREPROGRESS_RESULTS* pResults
2007 )
2008 {
2009 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREPROGRESS, pArgs, pResults, m_pvBAFunctionsProcContext);
2010 }
2011
2012 void OnCacheAcquireResolvingFallback(
2013 __in BA_ONCACHEACQUIRERESOLVING_ARGS* pArgs,
2014 __inout BA_ONCACHEACQUIRERESOLVING_RESULTS* pResults
2015 )
2016 {
2017 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRERESOLVING, pArgs, pResults, m_pvBAFunctionsProcContext);
2018 }
2019
2020 void OnCacheAcquireCompleteFallback(
2021 __in BA_ONCACHEACQUIRECOMPLETE_ARGS* pArgs,
2022 __inout BA_ONCACHEACQUIRECOMPLETE_RESULTS* pResults
2023 )
2024 {
2025 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2026 }
2027
2028 void OnCacheVerifyBeginFallback(
2029 __in BA_ONCACHEVERIFYBEGIN_ARGS* pArgs,
2030 __inout BA_ONCACHEVERIFYBEGIN_RESULTS* pResults
2031 )
2032 {
2033 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2034 }
2035
2036 void OnCacheVerifyCompleteFallback(
2037 __in BA_ONCACHEVERIFYCOMPLETE_ARGS* pArgs,
2038 __inout BA_ONCACHEVERIFYCOMPLETE_RESULTS* pResults
2039 )
2040 {
2041 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2042 }
2043
2044 void OnCachePackageCompleteFallback(
2045 __in BA_ONCACHEPACKAGECOMPLETE_ARGS* pArgs,
2046 __inout BA_ONCACHEPACKAGECOMPLETE_RESULTS* pResults
2047 )
2048 {
2049 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2050 }
2051
2052 void OnCacheCompleteFallback(
2053 __in BA_ONCACHECOMPLETE_ARGS* pArgs,
2054 __inout BA_ONCACHECOMPLETE_RESULTS* pResults
2055 )
2056 {
2057 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2058 }
2059
2060 void OnExecuteBeginFallback(
2061 __in BA_ONEXECUTEBEGIN_ARGS* pArgs,
2062 __inout BA_ONEXECUTEBEGIN_RESULTS* pResults
2063 )
2064 {
2065 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2066 }
2067
2068 void OnExecutePackageBeginFallback(
2069 __in BA_ONEXECUTEPACKAGEBEGIN_ARGS* pArgs,
2070 __inout BA_ONEXECUTEPACKAGEBEGIN_RESULTS* pResults
2071 )
2072 {
2073 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2074 }
2075
2076 void OnExecutePatchTargetFallback(
2077 __in BA_ONEXECUTEPATCHTARGET_ARGS* pArgs,
2078 __inout BA_ONEXECUTEPATCHTARGET_RESULTS* pResults
2079 )
2080 {
2081 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEPATCHTARGET, pArgs, pResults, m_pvBAFunctionsProcContext);
2082 }
2083
2084 void OnExecuteProgressFallback(
2085 __in BA_ONEXECUTEPROGRESS_ARGS* pArgs,
2086 __inout BA_ONEXECUTEPROGRESS_RESULTS* pResults
2087 )
2088 {
2089 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEPROGRESS, pArgs, pResults, m_pvBAFunctionsProcContext);
2090 }
2091
2092 void OnExecuteMsiMessageFallback(
2093 __in BA_ONEXECUTEMSIMESSAGE_ARGS* pArgs,
2094 __inout BA_ONEXECUTEMSIMESSAGE_RESULTS* pResults
2095 )
2096 {
2097 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEMSIMESSAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
2098 }
2099
2100 void OnExecuteFilesInUseFallback(
2101 __in BA_ONEXECUTEFILESINUSE_ARGS* pArgs,
2102 __inout BA_ONEXECUTEFILESINUSE_RESULTS* pResults
2103 )
2104 {
2105 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEFILESINUSE, pArgs, pResults, m_pvBAFunctionsProcContext);
2106 }
2107
2108 void OnExecutePackageCompleteFallback(
2109 __in BA_ONEXECUTEPACKAGECOMPLETE_ARGS* pArgs,
2110 __inout BA_ONEXECUTEPACKAGECOMPLETE_RESULTS* pResults
2111 )
2112 {
2113 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2114 }
2115
2116 void OnExecuteCompleteFallback(
2117 __in BA_ONEXECUTECOMPLETE_ARGS* pArgs,
2118 __inout BA_ONEXECUTECOMPLETE_RESULTS* pResults
2119 )
2120 {
2121 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2122 }
2123
2124 void OnUnregisterBeginFallback(
2125 __in BA_ONUNREGISTERBEGIN_ARGS* pArgs,
2126 __inout BA_ONUNREGISTERBEGIN_RESULTS* pResults
2127 )
2128 {
2129 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONUNREGISTERBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2130 }
2131
2132 void OnUnregisterCompleteFallback(
2133 __in BA_ONUNREGISTERCOMPLETE_ARGS* pArgs,
2134 __inout BA_ONUNREGISTERCOMPLETE_RESULTS* pResults
2135 )
2136 {
2137 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONUNREGISTERCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2138 }
2139
2140 void OnApplyCompleteFallback(
2141 __in BA_ONAPPLYCOMPLETE_ARGS* pArgs,
2142 __inout BA_ONAPPLYCOMPLETE_RESULTS* pResults
2143 )
2144 {
2145 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONAPPLYCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2146 }
2147
2148 void OnLaunchApprovedExeBeginFallback(
2149 __in BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS* pArgs,
2150 __inout BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS* pResults
2151 )
2152 {
2153 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2154 }
2155
2156 void OnLaunchApprovedExeCompleteFallback(
2157 __in BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS* pArgs,
2158 __inout BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS* pResults
2159 )
2160 {
2161 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2162 }
2163
2164 void OnPlanMsiPackageFallback(
2165 __in BA_ONPLANMSIPACKAGE_ARGS* pArgs,
2166 __inout BA_ONPLANMSIPACKAGE_RESULTS* pResults
2167 )
2168 {
2169 BURN_MSI_PROPERTY actionMsiProperty = pResults->actionMsiProperty;
2170 INSTALLUILEVEL uiLevel = pResults->uiLevel;
2171 BOOL fDisableExternalUiHandler = pResults->fDisableExternalUiHandler;
2172 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANMSIPACKAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
2173 BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_MSI_PACKAGE, m_hModule, pArgs->wzPackageId, actionMsiProperty, uiLevel, fDisableExternalUiHandler ? "yes" : "no", pResults->actionMsiProperty, pResults->uiLevel, pResults->fDisableExternalUiHandler ? "yes" : "no");
2174 }
2175
2176 void OnBeginMsiTransactionBeginFallback(
2177 __in BA_ONBEGINMSITRANSACTIONBEGIN_ARGS* pArgs,
2178 __inout BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS* pResults
2179 )
2180 {
2181 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2182 }
2183
2184 void OnBeginMsiTransactionCompleteFallback(
2185 __in BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS* pArgs,
2186 __inout BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS* pResults
2187 )
2188 {
2189 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2190 }
2191
2192 void OnCommitMsiTransactionBeginFallback(
2193 __in BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS* pArgs,
2194 __inout BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS* pResults
2195 )
2196 {
2197 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2198 }
2199
2200 void OnCommitMsiTransactionCompleteFallback(
2201 __in BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS* pArgs,
2202 __inout BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS* pResults
2203 )
2204 {
2205 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2206 }
2207
2208 void OnRollbackMsiTransactionBeginFallback(
2209 __in BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS* pArgs,
2210 __inout BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS* pResults
2211 )
2212 {
2213 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2214 }
2215
2216 void OnRollbackMsiTransactionCompleteFallback(
2217 __in BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS* pArgs,
2218 __inout BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS* pResults
2219 )
2220 {
2221 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2222 }
2223
2224 void OnPauseAutomaticUpdatesBeginFallback(
2225 __in BA_ONPAUSEAUTOMATICUPDATESBEGIN_ARGS* pArgs,
2226 __inout BA_ONPAUSEAUTOMATICUPDATESBEGIN_RESULTS* pResults
2227 )
2228 {
2229 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2230 }
2231
2232 void OnPauseAutomaticUpdatesCompleteFallback(
2233 __in BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_ARGS* pArgs,
2234 __inout BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_RESULTS* pResults
2235 )
2236 {
2237 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2238 }
2239
2240 void OnSystemRestorePointBeginFallback(
2241 __in BA_ONSYSTEMRESTOREPOINTBEGIN_ARGS* pArgs,
2242 __inout BA_ONSYSTEMRESTOREPOINTBEGIN_RESULTS* pResults
2243 )
2244 {
2245 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2246 }
2247
2248 void OnSystemRestorePointCompleteFallback(
2249 __in BA_ONSYSTEMRESTOREPOINTCOMPLETE_ARGS* pArgs,
2250 __inout BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS* pResults
2251 )
2252 {
2253 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2254 }
2255
2256 void OnPlanForwardCompatibleBundleFallback(
2257 __in BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs,
2258 __inout BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults
2259 )
2260 {
2261 BOOL fIgnoreBundle = pResults->fIgnoreBundle;
2262 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE, pArgs, pResults, m_pvBAFunctionsProcContext);
2263 BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_FORWARD_COMPATIBLE_BUNDLE, m_hModule, pArgs->wzBundleId, fIgnoreBundle ? "ignore" : "enable", pResults->fIgnoreBundle ? "ignore" : "enable");
2264 }
2265
2266 void OnCacheVerifyProgressFallback(
2267 __in BA_ONCACHEVERIFYPROGRESS_ARGS* pArgs,
2268 __inout BA_ONCACHEVERIFYPROGRESS_RESULTS* pResults
2269 )
2270 {
2271 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYPROGRESS, pArgs, pResults, m_pvBAFunctionsProcContext);
2272 }
2273
2274 void OnCacheContainerOrPayloadVerifyBeginFallback(
2275 __in BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS* pArgs,
2276 __inout BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS* pResults
2277 )
2278 {
2279 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2280 }
2281
2282 void OnCacheContainerOrPayloadVerifyCompleteFallback(
2283 __in BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS* pArgs,
2284 __inout BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS* pResults
2285 )
2286 {
2287 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2288 }
2289
2290 void OnCacheContainerOrPayloadVerifyProgressFallback(
2291 __in BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS* pArgs,
2292 __inout BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS* pResults
2293 )
2294 {
2295 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS, pArgs, pResults, m_pvBAFunctionsProcContext);
2296 }
2297
2298 void OnCachePayloadExtractBeginFallback(
2299 __in BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS* pArgs,
2300 __inout BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS* pResults
2301 )
2302 {
2303 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2304 }
2305
2306 void OnCachePayloadExtractCompleteFallback(
2307 __in BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS* pArgs,
2308 __inout BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS* pResults
2309 )
2310 {
2311 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2312 }
2313
2314 void OnCachePayloadExtractProgressFallback(
2315 __in BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS* pArgs,
2316 __inout BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS* pResults
2317 )
2318 {
2319 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS, pArgs, pResults, m_pvBAFunctionsProcContext);
2320 }
2321
2322 void OnPlanRollbackBoundaryFallback(
2323 __in BA_ONPLANROLLBACKBOUNDARY_ARGS* pArgs,
2324 __inout BA_ONPLANROLLBACKBOUNDARY_RESULTS* pResults
2325 )
2326 {
2327 BOOL fTransaction = pResults->fTransaction;
2328 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANROLLBACKBOUNDARY, pArgs, pResults, m_pvBAFunctionsProcContext);
2329 BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_ROLLBACK_BOUNDARY, m_hModule, pArgs->wzRollbackBoundaryId, LoggingBoolToString(fTransaction), LoggingBoolToString(pResults->fTransaction));
2330 }
2331
2332 void OnDetectCompatibleMsiPackageFallback(
2333 __in BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS* pArgs,
2334 __inout BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS* pResults
2335 )
2336 {
2337 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
2338 }
2339
2340 void OnPlanCompatibleMsiPackageBeginFallback(
2341 __in BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS* pArgs,
2342 __inout BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS* pResults
2343 )
2344 {
2345 BOOL fRequestRemove = pResults->fRequestRemove;
2346 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
2347 BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_COMPATIBLE_MSI_PACKAGE, m_hModule, pArgs->wzPackageId, pArgs->wzCompatiblePackageId, LoggingBoolToString(fRequestRemove), LoggingBoolToString(pResults->fRequestRemove));
2348 }
2349
2350 void OnPlanCompatibleMsiPackageCompleteFallback(
2351 __in BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS* pArgs,
2352 __inout BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS* pResults
2353 )
2354 {
2355 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
2356 }
2357
2358 void OnPlanRestoreRelatedBundleFallback(
2359 __in BA_ONPLANRESTORERELATEDBUNDLE_ARGS* pArgs,
2360 __inout BA_ONPLANRESTORERELATEDBUNDLE_RESULTS* pResults
2361 )
2362 {
2363 BOOTSTRAPPER_REQUEST_STATE requestedState = pResults->requestedState;
2364 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANRESTORERELATEDBUNDLE, pArgs, pResults, m_pvBAFunctionsProcContext);
2365 BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_RESTORE_RELATED_BUNDLE, m_hModule, pArgs->wzBundleId, LoggingRequestStateToString(requestedState), LoggingRequestStateToString(pResults->requestedState));
2366 }
2367
2368 void OnApplyDowngradeFallback(
2369 __in BA_ONAPPLYDOWNGRADE_ARGS* pArgs,
2370 __inout BA_ONAPPLYDOWNGRADE_RESULTS* pResults
2371 )
2372 {
2373 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONAPPLYDOWNGRADE, pArgs, pResults, m_pvBAFunctionsProcContext);
2374 }
2375
2376 void OnExecuteProcessCancelFallback(
2377 __in BA_ONEXECUTEPROCESSCANCEL_ARGS* pArgs,
2378 __inout BA_ONEXECUTEPROCESSCANCEL_RESULTS* pResults
2379 )
2380 {
2381 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEPROCESSCANCEL, pArgs, pResults, m_pvBAFunctionsProcContext);
2382 }
2383
2384 void OnDetectRelatedBundlePackageFallback(
2385 __in BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS* pArgs,
2386 __inout BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS* pResults
2387 )
2388 {
2389 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
2390 }
2391
2392 void OnCachePackageNonVitalValidationFailureFallback(
2393 __in BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_ARGS* pArgs,
2394 __inout BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_RESULTS* pResults
2395 )
2396 {
2397 m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE, pArgs, pResults, m_pvBAFunctionsProcContext);
2398 }
2399
2400
2401 HRESULT ShowMsiFilesInUse(
2402 __in DWORD cFiles,
2403 __in_ecount_z(cFiles) LPCWSTR* rgwzFiles,
2404 __in BOOTSTRAPPER_FILES_IN_USE_TYPE source,
2405 __inout int* pResult
2406 )
2407 {
2408 HRESULT hr = S_OK;
2409 LPWSTR sczFilesInUse = NULL;
2410 DWORD_PTR cchLen = 0;
2411 int nResult = IDERROR;
2412
2413 // If the user has chosen to ignore on a previously displayed "files in use" page,
2414 // we will return the same result for other cases. No need to display the page again.
2415 if (IDIGNORE == m_nLastMsiFilesInUseResult)
2416 {
2417 nResult = m_nLastMsiFilesInUseResult;
2418 }
2419 else if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay) // Only show files in use when using full display mode.
2420 {
2421 // See https://docs.microsoft.com/en-us/windows/win32/msi/sending-messages-to-windows-installer-using-msiprocessmessage for details.
2422 for (DWORD i = 1; i < cFiles; i += 2)
2423 {
2424 hr = ::StringCchLengthW(rgwzFiles[i], STRSAFE_MAX_CCH, reinterpret_cast<UINT_PTR*>(&cchLen));
2425 BalExitOnFailure(hr, "Failed to calculate length of string.");
2426
2427 if (cchLen)
2428 {
2429 hr = StrAllocConcatFormatted(&sczFilesInUse, L"%ls\r\n", rgwzFiles[i]);
2430 BalExitOnFailure(hr, "Failed to concat files in use.");
2431 }
2432 }
2433
2434 // Show applications using the files.
2435 if (BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI_RM == source)
2436 {
2437 hr = ShowRestartManagerMsiFilesInUseDialog(sczFilesInUse, &nResult);
2438 ExitOnFailure(hr, "Failed to show RM files-in-use dialog.");
2439 }
2440 else
2441 {
2442 hr = ShowStandardMsiFilesInUseDialog(sczFilesInUse, &nResult);
2443 ExitOnFailure(hr, "Failed to show files-in-use dialog.");
2444 }
2445 }
2446 else
2447 {
2448 // Silent UI level installations always shut down applications and services,
2449 // and on Windows Vista and later, use Restart Manager unless disabled.
2450 nResult = IDOK;
2451 }
2452
2453 LExit:
2454 ReleaseStr(sczFilesInUse);
2455
2456 // Remember the answer from the user.
2457 m_nLastMsiFilesInUseResult = FAILED(hr) ? IDERROR : nResult;
2458 *pResult = m_nLastMsiFilesInUseResult;
2459
2460 return hr;
2461 }
2462
2463
2464 int ShowRestartManagerMsiFilesInUseDialog(
2465 __in_z_opt LPCWSTR sczFilesInUse,
2466 __out int* pnResult
2467 )
2468 {
2469 HRESULT hr = S_OK;
2470 TASKDIALOGCONFIG config = { };
2471 LPWSTR sczTitle = NULL;
2472 LPWSTR sczLabel = NULL;
2473 LPWSTR sczCloseRadioButton = NULL;
2474 LPWSTR sczDontCloseRadioButton = NULL;
2475 int nButton = 0;
2476 int nRadioButton = 0;
2477
2478 hr = BalFormatString(m_pFilesInUseTitleLoc->wzText, &sczTitle);
2479 BalExitOnFailure(hr, "Failed to format FilesInUseTitle loc string.");
2480
2481 hr = BalFormatString(m_pFilesInUseLabelLoc->wzText, &sczLabel);
2482 BalExitOnFailure(hr, "Failed to format FilesInUseLabel loc string.");
2483
2484 hr = BalFormatString(m_pFilesInUseCloseRadioButtonLoc->wzText, &sczCloseRadioButton);
2485 BalExitOnFailure(hr, "Failed to format FilesInUseCloseRadioButton loc string.");
2486
2487 hr = BalFormatString(m_pFilesInUseDontCloseRadioButtonLoc->wzText, &sczDontCloseRadioButton);
2488 BalExitOnFailure(hr, "Failed to format FilesInUseDontCloseRadioButton loc string.");
2489
2490 const TASKDIALOG_BUTTON rgRadioButtons[] = {
2491 { IDOK, sczCloseRadioButton },
2492 { IDIGNORE, sczDontCloseRadioButton },
2493 };
2494
2495 config.cbSize = sizeof(config);
2496 config.hwndParent = m_hWnd;
2497 config.hInstance = m_hModule;
2498 config.dwFlags = TDF_SIZE_TO_CONTENT | TDF_POSITION_RELATIVE_TO_WINDOW;
2499 config.dwCommonButtons = TDCBF_OK_BUTTON | TDCBF_CANCEL_BUTTON;
2500 config.pszWindowTitle = sczTitle;
2501 config.pszMainInstruction = sczLabel;
2502 config.pszContent = sczFilesInUse ? sczFilesInUse : L"";
2503 config.nDefaultButton = IDOK;
2504 config.pRadioButtons = rgRadioButtons;
2505 config.cRadioButtons = countof(rgRadioButtons);
2506 config.nDefaultRadioButton = IDOK;
2507
2508 hr = ::TaskDialogIndirect(&config, &nButton, &nRadioButton, NULL);
2509 BalExitOnFailure(hr, "Failed to show RM files-in-use task dialog.");
2510
2511 *pnResult = IDOK == nButton ? nRadioButton : nButton;
2512
2513#ifdef DEBUG
2514 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: RMFilesInUse task dialog result: button - %d, radio button - %d, result - %d", nButton, nRadioButton, *pnResult);
2515#endif
2516
2517 LExit:
2518 ReleaseStr(sczTitle);
2519 ReleaseStr(sczLabel);
2520 ReleaseStr(sczCloseRadioButton);
2521 ReleaseStr(sczDontCloseRadioButton);
2522
2523 return hr;
2524 }
2525
2526
2527 int ShowStandardMsiFilesInUseDialog(
2528 __in_z_opt LPCWSTR sczFilesInUse,
2529 __out int* pnResult
2530 )
2531 {
2532 HRESULT hr = S_OK;
2533 TASKDIALOGCONFIG config = { };
2534 LPWSTR sczTitle = NULL;
2535 LPWSTR sczLabel = NULL;
2536 LPWSTR sczRetryButton = NULL;
2537 LPWSTR sczIgnoreButton = NULL;
2538 LPWSTR sczExitButton = NULL;
2539
2540 hr = BalFormatString(m_pFilesInUseTitleLoc->wzText, &sczTitle);
2541 BalExitOnFailure(hr, "Failed to format FilesInUseTitle loc string.");
2542
2543 hr = BalFormatString(m_pFilesInUseLabelLoc->wzText, &sczLabel);
2544 BalExitOnFailure(hr, "Failed to format FilesInUseLabel loc string.");
2545
2546 hr = BalFormatString(m_pFilesInUseRetryButtonLoc->wzText, &sczRetryButton);
2547 BalExitOnFailure(hr, "Failed to format FilesInUseRetryButton loc string.");
2548
2549 hr = BalFormatString(m_pFilesInUseIgnoreButtonLoc->wzText, &sczIgnoreButton);
2550 BalExitOnFailure(hr, "Failed to format FilesInUseIgnoreButton loc string.");
2551
2552 hr = BalFormatString(m_pFilesInUseExitButtonLoc->wzText, &sczExitButton);
2553 BalExitOnFailure(hr, "Failed to format FilesInUseExitButton loc string.");
2554
2555 const TASKDIALOG_BUTTON rgButtons[] = {
2556 { IDRETRY, sczRetryButton },
2557 { IDIGNORE, sczIgnoreButton },
2558 { IDCANCEL, sczExitButton },
2559 };
2560
2561 config.cbSize = sizeof(config);
2562 config.hwndParent = m_hWnd;
2563 config.hInstance = m_hModule;
2564 config.dwFlags = TDF_SIZE_TO_CONTENT | TDF_POSITION_RELATIVE_TO_WINDOW;
2565 config.pszWindowTitle = sczTitle;
2566 config.pszMainInstruction = sczLabel;
2567 config.pszContent = sczFilesInUse ? sczFilesInUse : L"";
2568 config.pButtons = rgButtons;
2569 config.cButtons = countof(rgButtons);
2570
2571 hr = ::TaskDialogIndirect(&config, pnResult, NULL, NULL);
2572 BalExitOnFailure(hr, "Failed to show files-in-use task dialog.");
2573
2574#ifdef DEBUG
2575 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: FilesInUse task dialog result: %d", *pnResult);
2576#endif
2577
2578 LExit:
2579 ReleaseStr(sczTitle);
2580 ReleaseStr(sczLabel);
2581 ReleaseStr(sczRetryButton);
2582 ReleaseStr(sczIgnoreButton);
2583 ReleaseStr(sczExitButton);
2584
2585 return hr;
2586 }
2587
2588
2589 HRESULT ShowNetfxFilesInUse(
2590 __in DWORD cFiles,
2591 __in_ecount_z(cFiles) LPCWSTR* rgwzFiles,
2592 __inout int* pResult
2593 )
2594 {
2595 HRESULT hr = S_OK;
2596 LPWSTR sczFilesInUse = NULL;
2597 DWORD_PTR cchLen = 0;
2598 int nResult = IDERROR;
2599
2600 // If the user has chosen to ignore on a previously displayed "files in use" page,
2601 // we will return the same result for other cases. No need to display the page again.
2602 if (IDNO == m_nLastNetfxFilesInUseResult)
2603 {
2604 nResult = m_nLastNetfxFilesInUseResult;
2605 }
2606 else if (BOOTSTRAPPER_DISPLAY_FULL != m_commandDisplay) // Only show files in use when using full display mode.
2607 {
2608 nResult = IDYES;
2609 }
2610 else
2611 {
2612 for (DWORD i = 0; i < cFiles; ++i)
2613 {
2614 hr = ::StringCchLengthW(rgwzFiles[i], STRSAFE_MAX_CCH, reinterpret_cast<UINT_PTR*>(&cchLen));
2615 BalExitOnFailure(hr, "Failed to calculate length of string.");
2616
2617 if (cchLen)
2618 {
2619 hr = StrAllocConcatFormatted(&sczFilesInUse, L"%ls\r\n", rgwzFiles[i]);
2620 BalExitOnFailure(hr, "Failed to concat files in use.");
2621 }
2622 }
2623
2624 // Show applications using the files.
2625 hr = ShowNetfxFilesInUseDialog(sczFilesInUse, &nResult);
2626 ExitOnFailure(hr, "Failed to show Netfx files-in-use dialog.");
2627 }
2628
2629 LExit:
2630 ReleaseStr(sczFilesInUse);
2631
2632 // Remember the answer from the user.
2633 m_nLastNetfxFilesInUseResult = FAILED(hr) ? IDERROR : nResult;
2634 *pResult = m_nLastNetfxFilesInUseResult;
2635
2636 return hr;
2637 }
2638
2639
2640 int ShowNetfxFilesInUseDialog(
2641 __in_z_opt LPCWSTR sczFilesInUse,
2642 __out int* pnResult
2643 )
2644 {
2645 HRESULT hr = S_OK;
2646 TASKDIALOGCONFIG config = { };
2647 LPWSTR sczTitle = NULL;
2648 LPWSTR sczLabel = NULL;
2649 LPWSTR sczNetfxCloseRadioButton = NULL;
2650 LPWSTR sczDontCloseRadioButton = NULL;
2651 int nButton = 0;
2652 int nRadioButton = 0;
2653
2654 hr = BalFormatString(m_pFilesInUseTitleLoc->wzText, &sczTitle);
2655 BalExitOnFailure(hr, "Failed to format FilesInUseTitle loc string.");
2656
2657 hr = BalFormatString(m_pFilesInUseLabelLoc->wzText, &sczLabel);
2658 BalExitOnFailure(hr, "Failed to format FilesInUseLabel loc string.");
2659
2660 hr = BalFormatString(m_pFilesInUseNetfxCloseRadioButtonLoc->wzText, &sczNetfxCloseRadioButton);
2661 BalExitOnFailure(hr, "Failed to format FilesInUseNetfxCloseRadioButton loc string.");
2662
2663 hr = BalFormatString(m_pFilesInUseDontCloseRadioButtonLoc->wzText, &sczDontCloseRadioButton);
2664 BalExitOnFailure(hr, "Failed to format FilesInUseDontCloseRadioButton loc string.");
2665
2666 const TASKDIALOG_BUTTON rgRadioButtons[] = {
2667 { IDYES, sczNetfxCloseRadioButton },
2668 { IDNO, sczDontCloseRadioButton },
2669 };
2670
2671 config.cbSize = sizeof(config);
2672 config.hwndParent = m_hWnd;
2673 config.hInstance = m_hModule;
2674 config.dwFlags = TDF_SIZE_TO_CONTENT | TDF_POSITION_RELATIVE_TO_WINDOW;
2675 config.dwCommonButtons = TDCBF_RETRY_BUTTON | TDCBF_OK_BUTTON | TDCBF_CANCEL_BUTTON;
2676 config.pszWindowTitle = sczTitle;
2677 config.pszMainInstruction = sczLabel;
2678 config.pszContent = sczFilesInUse ? sczFilesInUse : L"";
2679 config.nDefaultButton = IDRETRY;
2680 config.pRadioButtons = rgRadioButtons;
2681 config.cRadioButtons = countof(rgRadioButtons);
2682 config.nDefaultRadioButton = IDYES;
2683
2684 hr = ::TaskDialogIndirect(&config, &nButton, &nRadioButton, NULL);
2685 BalExitOnFailure(hr, "Failed to show Netfx files-in-use task dialog.");
2686
2687 *pnResult = IDOK == nButton ? nRadioButton : nButton;
2688
2689#ifdef DEBUG
2690 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: NetfxFilesInUse task dialog result: button - %d, radio button - %d, result - %d", nButton, nRadioButton, *pnResult);
2691#endif
2692
2693 LExit:
2694 ReleaseStr(sczTitle);
2695 ReleaseStr(sczLabel);
2696 ReleaseStr(sczNetfxCloseRadioButton);
2697 ReleaseStr(sczDontCloseRadioButton);
2698
2699 return hr;
2700 }
2701
2702private:
2703 //
2704 // UiThreadProc - entrypoint for UI thread.
2705 //
2706 static DWORD WINAPI UiThreadProc(
2707 __in LPVOID pvContext
2708 )
2709 {
2710 HRESULT hr = S_OK;
2711 CWixStandardBootstrapperApplication* pThis = (CWixStandardBootstrapperApplication*)pvContext;
2712 BOOL fComInitialized = FALSE;
2713 BOOL fRet = FALSE;
2714 MSG msg = { };
2715 DWORD dwQuit = 0;
2716 WM_WIXSTDBA firstAction = WM_WIXSTDBA_DETECT_PACKAGES;
2717
2718 // Initialize COM and theme.
2719 hr = ::CoInitialize(NULL);
2720 BalExitOnFailure(hr, "Failed to initialize COM.");
2721 fComInitialized = TRUE;
2722
2723 hr = pThis->InitializeTheme();
2724 BalExitOnFailure(hr, "Failed to initialize theme.");
2725
2726 // Create main window.
2727 pThis->InitializeTaskbarButton();
2728 hr = pThis->CreateMainWindow();
2729 BalExitOnFailure(hr, "Failed to create wixstdba main window.");
2730
2731 if (FAILED(pThis->m_hrFinal))
2732 {
2733 pThis->SetState(WIXSTDBA_STATE_FAILED, hr);
2734 firstAction = WM_WIXSTDBA_SHOW_FAILURE;
2735 }
2736 else
2737 {
2738 // Okay, we're ready for packages now.
2739 pThis->SetState(WIXSTDBA_STATE_INITIALIZED, hr);
2740
2741 if (pThis->m_fHandleHelp && BOOTSTRAPPER_ACTION_HELP == pThis->m_commandAction)
2742 {
2743 firstAction = WM_WIXSTDBA_SHOW_HELP;
2744 }
2745 }
2746
2747 ::PostMessageW(pThis->m_hWnd, firstAction, 0, 0);
2748
2749 // message pump
2750 while (0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0)))
2751 {
2752 if (-1 == fRet)
2753 {
2754 hr = E_UNEXPECTED;
2755 BalExitOnFailure(hr, "Unexpected return value from message pump.");
2756 }
2757 else if (!ThemeHandleKeyboardMessage(pThis->m_pTheme, msg.hwnd, &msg))
2758 {
2759 ::TranslateMessage(&msg);
2760 ::DispatchMessageW(&msg);
2761 }
2762 }
2763
2764 // Succeeded thus far, check to see if anything went wrong while actually
2765 // executing changes.
2766 if (FAILED(pThis->m_hrFinal))
2767 {
2768 hr = pThis->m_hrFinal;
2769 }
2770 else if (pThis->CheckCanceled())
2771 {
2772 hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2773 }
2774
2775 LExit:
2776 // destroy main window
2777 pThis->DestroyMainWindow();
2778 pThis->UninitializeTaskbarButton();
2779
2780 if (BOOTSTRAPPER_APPLY_RESTART_INITIATED == pThis->m_restartResult)
2781 {
2782 dwQuit = SUCCEEDED(hr) ? ERROR_SUCCESS_REBOOT_INITIATED : ERROR_FAIL_REBOOT_INITIATED;
2783 }
2784 else if (BOOTSTRAPPER_APPLY_RESTART_REQUIRED == pThis->m_restartResult)
2785 {
2786 dwQuit = SUCCEEDED(hr) ? ERROR_SUCCESS_REBOOT_REQUIRED : ERROR_FAIL_REBOOT_REQUIRED;
2787 }
2788 else if (SEVERITY_ERROR == HRESULT_SEVERITY(hr) && FACILITY_WIN32 == HRESULT_FACILITY(hr))
2789 {
2790 // Convert Win32 HRESULTs back to the error code.
2791 dwQuit = HRESULT_CODE(hr);
2792 }
2793 else
2794 {
2795 dwQuit = hr;
2796 }
2797
2798 // initiate engine shutdown
2799 pThis->m_pEngine->Quit(dwQuit);
2800
2801 ReleaseTheme(pThis->m_pTheme);
2802 ThemeUninitialize();
2803
2804 // uninitialize COM
2805 if (fComInitialized)
2806 {
2807 ::CoUninitialize();
2808 }
2809
2810 return hr;
2811 }
2812
2813
2814 //
2815 // InitializeData - initializes all the package and prerequisite information.
2816 //
2817 HRESULT InitializeData(
2818 __in BOOTSTRAPPER_COMMAND* pCommand
2819 )
2820 {
2821 HRESULT hr = S_OK;
2822 IXMLDOMDocument* pixdManifest = NULL;
2823
2824 hr = XmlInitialize();
2825 BalExitOnFailure(hr, "Failed to initialize XML.");
2826
2827 hr = BalManifestLoad(m_hModule, &pixdManifest);
2828 BalExitOnFailure(hr, "Failed to load bootstrapper application manifest.");
2829
2830 hr = BalInfoParseFromXml(&m_Bundle, pixdManifest);
2831 BalExitOnFailure(hr, "Failed to load bundle information.");
2832
2833 hr = ProcessCommandLine(&m_sczLanguage);
2834 ExitOnFailure(hr, "Unknown commandline parameters.");
2835
2836 hr = BalConditionsParseFromXml(&m_Conditions, pixdManifest, m_pWixLoc);
2837 BalExitOnFailure(hr, "Failed to load conditions from XML.");
2838
2839 hr = LoadBAFunctions(pixdManifest, pCommand);
2840 BalExitOnFailure(hr, "Failed to load bootstrapper functions.");
2841
2842 GetBundleFileVersion();
2843 // don't fail if we couldn't get the version info; best-effort only
2844
2845 if (m_fPrereq)
2846 {
2847 hr = InitializePrerequisiteInformation(pixdManifest);
2848 BalExitOnFailure(hr, "Failed to initialize prerequisite information.");
2849 }
2850 else
2851 {
2852 hr = ParseBootstrapperApplicationDataFromXml(pixdManifest);
2853 BalExitOnFailure(hr, "Failed to read bootstrapper application data.");
2854 }
2855
2856 if (m_fRequestedCacheOnly)
2857 {
2858 if (m_fSupportCacheOnly)
2859 {
2860 // Doesn't make sense to prompt the user if cache only is requested.
2861 if (BOOTSTRAPPER_DISPLAY_PASSIVE < m_commandDisplay)
2862 {
2863 m_commandDisplay = BOOTSTRAPPER_DISPLAY_PASSIVE;
2864 }
2865
2866 m_commandAction = BOOTSTRAPPER_ACTION_CACHE;
2867 }
2868 else
2869 {
2870 BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Ignoring attempt to only cache a bundle that does not explicitly support it.");
2871 }
2872 }
2873
2874 LExit:
2875 ReleaseObject(pixdManifest);
2876
2877 return hr;
2878 }
2879
2880
2881 //
2882 // InitializeTheme - initializes the theme information.
2883 //
2884 HRESULT InitializeTheme()
2885 {
2886 HRESULT hr = S_OK;
2887 LPWSTR sczModulePath = NULL;
2888
2889 hr = ThemeInitialize(m_hModule);
2890 BalExitOnFailure(hr, "Failed to initialize theme manager.");
2891
2892 hr = PathRelativeToModule(&sczModulePath, NULL, m_hModule);
2893 BalExitOnFailure(hr, "Failed to get module path.");
2894
2895 hr = LoadLocalization(sczModulePath, m_sczLanguage);
2896 ExitOnFailure(hr, "Failed to load localization.");
2897
2898 LoadFilesInUse();
2899
2900 hr = LoadTheme(sczModulePath, m_sczLanguage);
2901 ExitOnFailure(hr, "Failed to load theme.");
2902
2903 LExit:
2904 ReleaseStr(sczModulePath);
2905
2906 return hr;
2907 }
2908
2909 //
2910 // ProcessCommandLine - process the provided command line arguments.
2911 //
2912 HRESULT ProcessCommandLine(
2913 __inout LPWSTR* psczLanguage
2914 )
2915 {
2916 HRESULT hr = S_OK;
2917 int argc = 0;
2918 LPWSTR* argv = NULL;
2919 BOOL fUnknownArg = FALSE;
2920
2921 argc = m_BalInfoCommand.cUnknownArgs;
2922 argv = m_BalInfoCommand.rgUnknownArgs;
2923
2924 if (argc)
2925 {
2926 for (int i = 0; i < argc; ++i)
2927 {
2928 fUnknownArg = FALSE;
2929
2930 if (argv[i][0] == L'-' || argv[i][0] == L'/')
2931 {
2932 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"lang", -1))
2933 {
2934 if (i + 1 >= argc)
2935 {
2936 hr = E_INVALIDARG;
2937 BalExitOnFailure(hr, "Must specify a language.");
2938 }
2939
2940 ++i;
2941
2942 hr = StrAllocString(psczLanguage, &argv[i][0], 0);
2943 BalExitOnFailure(hr, "Failed to copy language.");
2944 }
2945 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"cache", -1))
2946 {
2947 m_fRequestedCacheOnly = TRUE;
2948 }
2949 else
2950 {
2951 fUnknownArg = TRUE;
2952 }
2953 }
2954 else
2955 {
2956 fUnknownArg = TRUE;
2957 }
2958
2959 if (fUnknownArg)
2960 {
2961 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Ignoring unknown argument: %ls", argv[i]);
2962 }
2963 }
2964 }
2965
2966 hr = BalSetOverridableVariablesFromEngine(&m_Bundle.overridableVariables, &m_BalInfoCommand, m_pEngine);
2967 BalExitOnFailure(hr, "Failed to set overridable variables from the command line.");
2968
2969 LExit:
2970 return hr;
2971 }
2972
2973 HRESULT LoadLocalization(
2974 __in_z LPCWSTR wzModulePath,
2975 __in_z_opt LPCWSTR wzLanguage
2976 )
2977 {
2978 HRESULT hr = S_OK;
2979 LPWSTR sczLocPath = NULL;
2980 LPWSTR sczFormatted = NULL;
2981 LPCWSTR wzLocFileName = m_fPrereq ? L"wixpreq.wxl" : L"thm.wxl";
2982
2983 // Find and load .wxl file.
2984 hr = LocProbeForFile(wzModulePath, wzLocFileName, wzLanguage, &sczLocPath);
2985 BalExitOnFailure(hr, "Failed to probe for loc file: %ls in path: %ls", wzLocFileName, wzModulePath);
2986
2987 hr = LocLoadFromFile(sczLocPath, &m_pWixLoc);
2988 BalExitOnFailure(hr, "Failed to load loc file from path: %ls", sczLocPath);
2989
2990 // Set WixStdBALanguageId to .wxl language id.
2991 if (WIX_LOCALIZATION_LANGUAGE_NOT_SET != m_pWixLoc->dwLangId)
2992 {
2993 ::SetThreadLocale(m_pWixLoc->dwLangId);
2994
2995 hr = m_pEngine->SetVariableNumeric(WIXSTDBA_VARIABLE_LANGUAGE_ID, m_pWixLoc->dwLangId);
2996 BalExitOnFailure(hr, "Failed to set WixStdBALanguageId variable.");
2997 }
2998
2999 // Load ConfirmCancelMessage.
3000 hr = StrAllocString(&m_sczConfirmCloseMessage, L"#(loc.ConfirmCancelMessage)", 0);
3001 ExitOnFailure(hr, "Failed to initialize confirm message loc identifier.");
3002
3003 hr = LocLocalizeString(m_pWixLoc, &m_sczConfirmCloseMessage);
3004 BalExitOnFailure(hr, "Failed to localize confirm close message: %ls", m_sczConfirmCloseMessage);
3005
3006 hr = BalFormatString(m_sczConfirmCloseMessage, &sczFormatted);
3007 if (SUCCEEDED(hr))
3008 {
3009 ReleaseStr(m_sczConfirmCloseMessage);
3010 m_sczConfirmCloseMessage = sczFormatted;
3011 sczFormatted = NULL;
3012 }
3013
3014 LExit:
3015 ReleaseStr(sczFormatted);
3016 ReleaseStr(sczLocPath);
3017
3018 return hr;
3019 }
3020
3021
3022 HRESULT LoadIndividualLocString(
3023 __in_z LPCWSTR wzId,
3024 __out LOC_STRING** ppLocString
3025 )
3026 {
3027 HRESULT hr = LocGetString(m_pWixLoc, wzId, ppLocString);
3028
3029 if (E_NOTFOUND == hr)
3030 {
3031 BalLog(BOOTSTRAPPER_LOG_LEVEL_DEBUG, "WIXSTDBA: Missing loc string '%ls'.", wzId);
3032 }
3033
3034 return hr;
3035 }
3036
3037
3038 void LoadFilesInUse()
3039 {
3040 // Get the loc strings for the files-in-use dialogs.
3041 LoadIndividualLocString(L"#(loc.FilesInUseTitle)", &m_pFilesInUseTitleLoc);
3042 LoadIndividualLocString(L"#(loc.FilesInUseLabel)", &m_pFilesInUseLabelLoc);
3043 LoadIndividualLocString(L"#(loc.FilesInUseCloseRadioButton)", &m_pFilesInUseCloseRadioButtonLoc);
3044 LoadIndividualLocString(L"#(loc.FilesInUseDontCloseRadioButton)", &m_pFilesInUseDontCloseRadioButtonLoc);
3045 LoadIndividualLocString(L"#(loc.FilesInUseRetryButton)", &m_pFilesInUseRetryButtonLoc);
3046 LoadIndividualLocString(L"#(loc.FilesInUseIgnoreButton)", &m_pFilesInUseIgnoreButtonLoc);
3047 LoadIndividualLocString(L"#(loc.FilesInUseExitButton)", &m_pFilesInUseExitButtonLoc);
3048 LoadIndividualLocString(L"#(loc.FilesInUseNetfxCloseRadioButton)", &m_pFilesInUseNetfxCloseRadioButtonLoc);
3049
3050 m_fShowRMFilesInUse = m_pFilesInUseTitleLoc && m_pFilesInUseLabelLoc && m_pFilesInUseCloseRadioButtonLoc && m_pFilesInUseDontCloseRadioButtonLoc;
3051 m_fShowStandardFilesInUse = m_pFilesInUseTitleLoc && m_pFilesInUseLabelLoc && m_pFilesInUseRetryButtonLoc && m_pFilesInUseIgnoreButtonLoc && m_pFilesInUseExitButtonLoc;
3052 m_fShowNetfxFilesInUse = m_pFilesInUseTitleLoc && m_pFilesInUseLabelLoc && m_pFilesInUseNetfxCloseRadioButtonLoc && m_pFilesInUseDontCloseRadioButtonLoc;
3053 }
3054
3055
3056 HRESULT LoadTheme(
3057 __in_z LPCWSTR wzModulePath,
3058 __in_z_opt LPCWSTR wzLanguage
3059 )
3060 {
3061 HRESULT hr = S_OK;
3062 LPWSTR sczThemePath = NULL;
3063 LPCWSTR wzThemeFileName = m_fPrereq ? L"wixpreq.thm" : L"thm.xml";
3064
3065 hr = LocProbeForFile(wzModulePath, wzThemeFileName, wzLanguage, &sczThemePath);
3066 BalExitOnFailure(hr, "Failed to probe for theme file: %ls in path: %ls", wzThemeFileName, wzModulePath);
3067
3068 hr = ThemeLoadFromFile(sczThemePath, &m_pTheme);
3069 BalExitOnFailure(hr, "Failed to load theme from path: %ls", sczThemePath);
3070
3071 hr = ThemeRegisterVariableCallbacks(m_pTheme, EvaluateVariableConditionCallback, FormatVariableStringCallback, GetVariableNumericCallback, SetVariableNumericCallback, GetVariableStringCallback, SetVariableStringCallback, NULL);
3072 BalExitOnFailure(hr, "Failed to register variable theme callbacks.");
3073
3074 C_ASSERT(COUNT_WIXSTDBA_PAGE == countof(vrgwzPageNames));
3075 C_ASSERT(countof(m_rgdwPageIds) == countof(vrgwzPageNames));
3076
3077 ThemeGetPageIds(m_pTheme, vrgwzPageNames, m_rgdwPageIds, countof(m_rgdwPageIds));
3078
3079 hr = ThemeLocalize(m_pTheme, m_pWixLoc);
3080 BalExitOnFailure(hr, "Failed to localize theme: %ls", sczThemePath);
3081
3082 LExit:
3083 ReleaseStr(sczThemePath);
3084
3085 return hr;
3086 }
3087
3088
3089 HRESULT InitializePrerequisiteInformation(
3090 __in IXMLDOMDocument* pixdManifest
3091 )
3092 {
3093 HRESULT hr = S_OK;
3094 BAL_INFO_PACKAGE* pPackage = NULL;
3095 IXMLDOMNode* pNode = NULL;
3096 BOOL fXmlFound = FALSE;
3097 DWORD dwBool = 0;
3098 BOOL fHandleLayout = FALSE;
3099
3100 // Read any prereq BA data from the BA manifest.
3101 hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixPrereqOptions", &pNode);
3102 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to read prereq options from BootstrapperApplication.xml manifest.");
3103
3104 if (fXmlFound)
3105 {
3106 hr = XmlGetAttributeNumber(pNode, L"Primary", &dwBool);
3107 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get WixPrereqOptions/@Primary value.");
3108
3109 m_fPreplanPrereqs = fXmlFound && (0 != dwBool);
3110
3111 hr = XmlGetAttributeNumber(pNode, L"HandleHelp", &dwBool);
3112 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get WixPrereqOptions/@HandleHelp value.");
3113
3114 m_fHandleHelp = fXmlFound && (0 != dwBool);
3115
3116 hr = XmlGetAttributeNumber(pNode, L"HandleLayout", &dwBool);
3117 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get WixPrereqOptions/@HandleLayout value.");
3118
3119 fHandleLayout = fXmlFound && (0 != dwBool);
3120 }
3121
3122 // If pre-req BA has requested that this BA be in charge of layout.
3123 if (fHandleLayout && BOOTSTRAPPER_ACTION_LAYOUT == m_commandAction)
3124 {
3125 m_fPrereq = FALSE;
3126 ExitFunction();
3127 }
3128
3129 // Pre-req BA should only show help or do an install (to launch the parent BA which can then do the right action).
3130 if (BOOTSTRAPPER_ACTION_HELP != m_commandAction)
3131 {
3132 m_commandAction = BOOTSTRAPPER_ACTION_INSTALL;
3133 }
3134
3135 for (DWORD i = 0; i < m_Bundle.packages.cPackages; ++i)
3136 {
3137 pPackage = &m_Bundle.packages.rgPackages[i];
3138 if (!pPackage->fPrereqPackage)
3139 {
3140 continue;
3141 }
3142
3143 if (pPackage->sczPrereqLicenseFile)
3144 {
3145 if (m_sczLicenseFile)
3146 {
3147 hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
3148 BalExitOnFailure(hr, "More than one license file specified in prerequisite info.");
3149 }
3150
3151 hr = StrAllocString(&m_sczLicenseFile, pPackage->sczPrereqLicenseFile, 0);
3152 BalExitOnFailure(hr, "Failed to copy license file location from prereq package.");
3153 }
3154
3155 if (pPackage->sczPrereqLicenseUrl)
3156 {
3157 if (m_sczLicenseUrl)
3158 {
3159 hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
3160 BalExitOnFailure(hr, "More than one license URL specified in prerequisite info.");
3161 }
3162
3163 hr = StrAllocString(&m_sczLicenseUrl, pPackage->sczPrereqLicenseUrl, 0);
3164 BalExitOnFailure(hr, "Failed to copy license URL from prereq package.");
3165 }
3166 }
3167
3168 LExit:
3169 return hr;
3170 }
3171
3172
3173 HRESULT ParseBootstrapperApplicationDataFromXml(
3174 __in IXMLDOMDocument* pixdManifest
3175 )
3176 {
3177 HRESULT hr = S_OK;
3178 IXMLDOMNode* pNode = NULL;
3179 DWORD dwBool = 0;
3180 BOOL fXmlFound = FALSE;
3181
3182 hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixStdbaInformation", &pNode);
3183 BalExitOnRequiredXmlQueryFailure(hr, "BootstrapperApplication.xml manifest is missing wixstdba information.");
3184
3185 hr = XmlGetAttributeEx(pNode, L"LicenseFile", &m_sczLicenseFile);
3186 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get license file.");
3187
3188 hr = XmlGetAttributeEx(pNode, L"LicenseUrl", &m_sczLicenseUrl);
3189 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get license URL.");
3190
3191 ReleaseObject(pNode);
3192
3193 hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixStdbaOptions", &pNode);
3194 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to read wixstdba options from BootstrapperApplication.xml manifest.");
3195
3196 if (!fXmlFound)
3197 {
3198 ExitFunction();
3199 }
3200
3201 hr = XmlGetAttributeNumber(pNode, L"SuppressOptionsUI", &dwBool);
3202 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get SuppressOptionsUI value.");
3203
3204 if (fXmlFound && dwBool)
3205 {
3206 hr = BalSetNumericVariable(WIXSTDBA_VARIABLE_SUPPRESS_OPTIONS_UI, 1);
3207 BalExitOnFailure(hr, "Failed to set '%ls' variable.", WIXSTDBA_VARIABLE_SUPPRESS_OPTIONS_UI);
3208 }
3209
3210 dwBool = 0;
3211 hr = XmlGetAttributeNumber(pNode, L"SuppressDowngradeFailure", &dwBool);
3212 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get SuppressDowngradeFailure value.");
3213
3214 if (fXmlFound)
3215 {
3216 m_fSuppressDowngradeFailure = 0 < dwBool;
3217 }
3218
3219 dwBool = 0;
3220 hr = XmlGetAttributeNumber(pNode, L"SuppressRepair", &dwBool);
3221 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get SuppressRepair value.");
3222
3223 if (fXmlFound)
3224 {
3225 m_fSuppressRepair = 0 < dwBool;
3226 }
3227
3228 hr = XmlGetAttributeNumber(pNode, L"ShowVersion", &dwBool);
3229 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get ShowVersion value.");
3230
3231 if (fXmlFound && dwBool)
3232 {
3233 hr = BalSetNumericVariable(WIXSTDBA_VARIABLE_SHOW_VERSION, 1);
3234 BalExitOnFailure(hr, "Failed to set '%ls' variable.", WIXSTDBA_VARIABLE_SHOW_VERSION);
3235 }
3236
3237 hr = XmlGetAttributeNumber(pNode, L"SupportCacheOnly", &dwBool);
3238 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get SupportCacheOnly value.");
3239
3240 if (fXmlFound)
3241 {
3242 m_fSupportCacheOnly = 0 < dwBool;
3243 }
3244
3245 LExit:
3246 ReleaseObject(pNode);
3247 return hr;
3248 }
3249
3250
3251 //
3252 // Get the file version of the bootstrapper and record in bootstrapper log file
3253 //
3254 HRESULT GetBundleFileVersion()
3255 {
3256 HRESULT hr = S_OK;
3257 ULARGE_INTEGER uliVersion = { };
3258 LPWSTR sczCurrentPath = NULL;
3259 VERUTIL_VERSION* pVersion = NULL;
3260
3261 hr = PathForCurrentProcess(&sczCurrentPath, NULL);
3262 BalExitOnFailure(hr, "Failed to get bundle path.");
3263
3264 hr = FileVersion(sczCurrentPath, &uliVersion.HighPart, &uliVersion.LowPart);
3265 BalExitOnFailure(hr, "Failed to get bundle file version.");
3266
3267 hr = VerVersionFromQword(uliVersion.QuadPart, &pVersion);
3268 BalExitOnFailure(hr, "Failed to create bundle file version.");
3269
3270 hr = m_pEngine->SetVariableVersion(WIXSTDBA_VARIABLE_BUNDLE_FILE_VERSION, pVersion->sczVersion);
3271 BalExitOnFailure(hr, "Failed to set WixBundleFileVersion variable.");
3272
3273 LExit:
3274 ReleaseVerutilVersion(pVersion);
3275 ReleaseStr(sczCurrentPath);
3276
3277 return hr;
3278 }
3279
3280
3281 //
3282 // CreateMainWindow - creates the main install window.
3283 //
3284 HRESULT CreateMainWindow()
3285 {
3286 HRESULT hr = S_OK;
3287 WNDCLASSW wc = { };
3288 DWORD dwWindowStyle = 0;
3289 int x = CW_USEDEFAULT;
3290 int y = CW_USEDEFAULT;
3291 POINT ptCursor = { };
3292
3293 ThemeInitializeWindowClass(m_pTheme, &wc, CWixStandardBootstrapperApplication::WndProc, m_hModule, WIXSTDBA_WINDOW_CLASS);
3294
3295 // If the theme did not provide an icon, try using the icon from the bundle engine.
3296 if (!wc.hIcon)
3297 {
3298 HMODULE hBootstrapperEngine = ::GetModuleHandleW(NULL);
3299 if (hBootstrapperEngine)
3300 {
3301 wc.hIcon = ::LoadIconW(hBootstrapperEngine, MAKEINTRESOURCEW(1));
3302 }
3303 }
3304
3305 // Register the window class and create the window.
3306 if (!::RegisterClassW(&wc))
3307 {
3308 ExitWithLastError(hr, "Failed to register window.");
3309 }
3310
3311 m_fRegistered = TRUE;
3312
3313 // Calculate the window style based on the theme style and command display value.
3314 dwWindowStyle = m_pTheme->dwStyle;
3315 if (BOOTSTRAPPER_DISPLAY_NONE >= m_commandDisplay || m_fPreplanPrereqs)
3316 {
3317 dwWindowStyle &= ~WS_VISIBLE;
3318 }
3319
3320 // Don't show the window if there is a splash screen (it will be made visible when the splash screen is hidden)
3321 if (::IsWindow(m_hwndSplashScreen))
3322 {
3323 dwWindowStyle &= ~WS_VISIBLE;
3324 }
3325
3326 // Center the window on the monitor with the mouse.
3327 if (::GetCursorPos(&ptCursor))
3328 {
3329 x = ptCursor.x;
3330 y = ptCursor.y;
3331 }
3332
3333 hr = ThemeCreateParentWindow(m_pTheme, 0, wc.lpszClassName, m_pTheme->sczCaption, dwWindowStyle, x, y, HWND_DESKTOP, m_hModule, this, THEME_WINDOW_INITIAL_POSITION_CENTER_MONITOR_FROM_COORDINATES, &m_hWnd);
3334 ExitOnFailure(hr, "Failed to create wixstdba theme window.");
3335
3336 OnThemeLoaded();
3337
3338 hr = S_OK;
3339
3340 LExit:
3341 return hr;
3342 }
3343
3344
3345 //
3346 // InitializeTaskbarButton - initializes taskbar button for progress.
3347 //
3348 void InitializeTaskbarButton()
3349 {
3350 HRESULT hr = S_OK;
3351
3352 hr = ::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_ALL, __uuidof(ITaskbarList3), reinterpret_cast<LPVOID*>(&m_pTaskbarList));
3353 if (REGDB_E_CLASSNOTREG == hr) // not supported before Windows 7
3354 {
3355 ExitFunction1(hr = S_OK);
3356 }
3357 BalExitOnFailure(hr, "Failed to create ITaskbarList3. Continuing.");
3358
3359 m_uTaskbarButtonCreatedMessage = ::RegisterWindowMessageW(L"TaskbarButtonCreated");
3360 BalExitOnNullWithLastError(m_uTaskbarButtonCreatedMessage, hr, "Failed to get TaskbarButtonCreated message. Continuing.");
3361
3362 LExit:
3363 return;
3364 }
3365
3366 //
3367 // DestroyMainWindow - clean up all the window registration.
3368 //
3369 void DestroyMainWindow()
3370 {
3371 if (::IsWindow(m_hWnd))
3372 {
3373 ::DestroyWindow(m_hWnd);
3374 m_hWnd = NULL;
3375 m_fTaskbarButtonOK = FALSE;
3376 }
3377
3378 if (m_fRegistered)
3379 {
3380 ::UnregisterClassW(WIXSTDBA_WINDOW_CLASS, m_hModule);
3381 m_fRegistered = FALSE;
3382 }
3383 }
3384
3385
3386 //
3387 // UninitializeTaskbarButton - clean up the taskbar registration.
3388 //
3389 void UninitializeTaskbarButton()
3390 {
3391 m_fTaskbarButtonOK = FALSE;
3392 ReleaseNullObject(m_pTaskbarList);
3393 }
3394
3395
3396 static LRESULT CallDefaultWndProc(
3397 __in CWixStandardBootstrapperApplication* pBA,
3398 __in HWND hWnd,
3399 __in UINT uMsg,
3400 __in WPARAM wParam,
3401 __in LPARAM lParam
3402 )
3403 {
3404 LRESULT lres = NULL;
3405 THEME* pTheme = NULL;
3406 HRESULT hr = S_OK;
3407 BA_FUNCTIONS_WNDPROC_ARGS wndProcArgs = { };
3408 BA_FUNCTIONS_WNDPROC_RESULTS wndProcResults = { };
3409
3410 if (pBA)
3411 {
3412 pTheme = pBA->m_pTheme;
3413
3414 if (pBA->m_pfnBAFunctionsProc)
3415 {
3416 wndProcArgs.cbSize = sizeof(wndProcArgs);
3417 wndProcArgs.hWnd = hWnd;
3418 wndProcArgs.uMsg = uMsg;
3419 wndProcArgs.wParam = wParam;
3420 wndProcArgs.lParam = lParam;
3421 wndProcResults.cbSize = sizeof(wndProcResults);
3422
3423 hr = pBA->m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_WNDPROC, &wndProcArgs, &wndProcResults, pBA->m_pvBAFunctionsProcContext);
3424
3425 if (E_NOTIMPL == hr)
3426 {
3427 hr = S_OK;
3428 }
3429 else
3430 {
3431 BalExitOnFailure(hr, "BAFunctions WndProc failed.");
3432
3433 if (wndProcResults.fProcessed)
3434 {
3435 lres = wndProcResults.lResult;
3436 ExitFunction();
3437 }
3438 }
3439 }
3440 }
3441
3442 lres = ThemeDefWindowProc(pTheme, hWnd, uMsg, wParam, lParam);
3443
3444 LExit:
3445 return lres;
3446 }
3447
3448 //
3449 // WndProc - standard windows message handler.
3450 //
3451 static LRESULT CALLBACK WndProc(
3452 __in HWND hWnd,
3453 __in UINT uMsg,
3454 __in WPARAM wParam,
3455 __in LPARAM lParam
3456 )
3457 {
3458#pragma warning(suppress:4312)
3459 CWixStandardBootstrapperApplication* pBA = reinterpret_cast<CWixStandardBootstrapperApplication*>(::GetWindowLongPtrW(hWnd, GWLP_USERDATA));
3460
3461 switch (uMsg)
3462 {
3463 case WM_NCCREATE:
3464 {
3465 LPCREATESTRUCT lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);
3466 pBA = reinterpret_cast<CWixStandardBootstrapperApplication*>(lpcs->lpCreateParams);
3467#pragma warning(suppress:4244)
3468 ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pBA));
3469 }
3470 break;
3471
3472 case WM_NCDESTROY:
3473 {
3474 LRESULT lres = CallDefaultWndProc(pBA, hWnd, uMsg, wParam, lParam);
3475 ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, 0);
3476 ::PostQuitMessage(0);
3477 return lres;
3478 }
3479
3480 case WM_THMUTIL_LOADING_CONTROL:
3481 return pBA->OnThemeLoadingControl(reinterpret_cast<THEME_LOADINGCONTROL_ARGS*>(wParam), reinterpret_cast<THEME_LOADINGCONTROL_RESULTS*>(lParam));
3482
3483 case WM_THMUTIL_LOADED_CONTROL:
3484 return pBA->OnThemeLoadedControl(reinterpret_cast<THEME_LOADEDCONTROL_ARGS*>(wParam), reinterpret_cast<THEME_LOADEDCONTROL_RESULTS*>(lParam));
3485
3486 case WM_CLOSE:
3487 // If the user chose not to close, do *not* let the default window proc handle the message.
3488 if (!pBA->OnClose())
3489 {
3490 return 0;
3491 }
3492 break;
3493
3494 case WM_WIXSTDBA_SHOW_HELP:
3495 pBA->OnShowHelp();
3496 return 0;
3497
3498 case WM_WIXSTDBA_DETECT_PACKAGES:
3499 pBA->OnDetect();
3500 return 0;
3501
3502 case WM_WIXSTDBA_PLAN_PACKAGES:
3503 pBA->OnPlan(static_cast<BOOTSTRAPPER_ACTION>(lParam));
3504 return 0;
3505
3506 case WM_WIXSTDBA_APPLY_PACKAGES:
3507 pBA->OnApply();
3508 return 0;
3509
3510 case WM_WIXSTDBA_CHANGE_STATE:
3511 pBA->OnChangeState(static_cast<WIXSTDBA_STATE>(lParam));
3512 return 0;
3513
3514 case WM_WIXSTDBA_SHOW_FAILURE:
3515 pBA->OnShowFailure();
3516 return 0;
3517
3518 case WM_WIXSTDBA_PLAN_PREREQS:
3519 pBA->OnPlanPrereqs(static_cast<BOOTSTRAPPER_ACTION>(lParam));
3520 return 0;
3521
3522 case WM_THMUTIL_CONTROL_WM_COMMAND:
3523 return pBA->OnThemeControlWmCommand(reinterpret_cast<THEME_CONTROLWMCOMMAND_ARGS*>(wParam), reinterpret_cast<THEME_CONTROLWMCOMMAND_RESULTS*>(lParam));
3524
3525 case WM_THMUTIL_CONTROL_WM_NOTIFY:
3526 return pBA->OnThemeControlWmNotify(reinterpret_cast<THEME_CONTROLWMNOTIFY_ARGS*>(wParam), reinterpret_cast<THEME_CONTROLWMNOTIFY_RESULTS*>(lParam));
3527 }
3528
3529 if (pBA && pBA->m_pTaskbarList && uMsg == pBA->m_uTaskbarButtonCreatedMessage)
3530 {
3531 pBA->m_fTaskbarButtonOK = TRUE;
3532 return 0;
3533 }
3534
3535 return CallDefaultWndProc(pBA, hWnd, uMsg, wParam, lParam);
3536 }
3537
3538
3539 //
3540 // OnThemeLoaded - finishes loading the theme.
3541 //
3542 BOOL OnThemeLoaded()
3543 {
3544 HRESULT hr = S_OK;
3545 BA_FUNCTIONS_ONTHEMELOADED_ARGS themeLoadedArgs = { };
3546 BA_FUNCTIONS_ONTHEMELOADED_RESULTS themeLoadedResults = { };
3547
3548 if (m_pfnBAFunctionsProc)
3549 {
3550 themeLoadedArgs.cbSize = sizeof(themeLoadedArgs);
3551 themeLoadedArgs.hWnd = m_pTheme->hwndParent;
3552 themeLoadedResults.cbSize = sizeof(themeLoadedResults);
3553 hr = m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONTHEMELOADED, &themeLoadedArgs, &themeLoadedResults, m_pvBAFunctionsProcContext);
3554 BalExitOnFailure(hr, "BAFunctions OnThemeLoaded failed.");
3555 }
3556
3557 LExit:
3558 return SUCCEEDED(hr);
3559 }
3560
3561 BOOL OnThemeLoadingControl(
3562 __in const THEME_LOADINGCONTROL_ARGS* pArgs,
3563 __in THEME_LOADINGCONTROL_RESULTS* pResults
3564 )
3565 {
3566 HRESULT hr = S_OK;
3567 BOOL fProcessed = FALSE;
3568 BA_FUNCTIONS_ONTHEMECONTROLLOADING_ARGS themeControlLoadingArgs = { };
3569 BA_FUNCTIONS_ONTHEMECONTROLLOADING_RESULTS themeControlLoadingResults = { };
3570
3571 for (DWORD iAssignControl = 0; iAssignControl < countof(m_rgInitControls); ++iAssignControl)
3572 {
3573 THEME_ASSIGN_CONTROL_ID* pAssignControl = m_rgInitControls + iAssignControl;
3574 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pArgs->pThemeControl->sczName, -1, pAssignControl->wzName, -1))
3575 {
3576 if (!pAssignControl->ppControl)
3577 {
3578 BalExitWithRootFailure(hr, E_INVALIDSTATE, "Control '%ls' has no member variable", pAssignControl->wzName);
3579 }
3580
3581 if (*pAssignControl->ppControl)
3582 {
3583 BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Duplicate control name: %ls", pAssignControl->wzName);
3584 }
3585 else
3586 {
3587 *pAssignControl->ppControl = pArgs->pThemeControl;
3588 }
3589
3590 fProcessed = TRUE;
3591 pResults->wId = pAssignControl->wId;
3592 pResults->dwAutomaticBehaviorType = pAssignControl->dwAutomaticBehaviorType;
3593 ExitFunction();
3594 }
3595 }
3596
3597 if (m_pfnBAFunctionsProc)
3598 {
3599 themeControlLoadingArgs.cbSize = sizeof(themeControlLoadingArgs);
3600 themeControlLoadingArgs.wzName = pArgs->pThemeControl->sczName;
3601
3602 themeControlLoadingResults.cbSize = sizeof(themeControlLoadingResults);
3603 themeControlLoadingResults.wId = pResults->wId;
3604 themeControlLoadingResults.dwAutomaticBehaviorType = pResults->dwAutomaticBehaviorType;
3605
3606 hr = m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADING, &themeControlLoadingArgs, &themeControlLoadingResults, m_pvBAFunctionsProcContext);
3607
3608 if (E_NOTIMPL == hr)
3609 {
3610 hr = S_OK;
3611 }
3612 else
3613 {
3614 BalExitOnFailure(hr, "BAFunctions OnThemeControlLoading failed.");
3615
3616 if (themeControlLoadingResults.fProcessed)
3617 {
3618 fProcessed = TRUE;
3619 pResults->wId = themeControlLoadingResults.wId;
3620 pResults->dwAutomaticBehaviorType = themeControlLoadingResults.dwAutomaticBehaviorType;
3621 }
3622 }
3623 }
3624
3625 LExit:
3626 pResults->hr = hr;
3627 return fProcessed || FAILED(hr);
3628 }
3629
3630 BOOL OnThemeLoadedControl(
3631 __in const THEME_LOADEDCONTROL_ARGS* pArgs,
3632 __in THEME_LOADEDCONTROL_RESULTS* pResults
3633 )
3634 {
3635 HRESULT hr = S_OK;
3636 BOOL fProcessed = FALSE;
3637 BA_FUNCTIONS_ONTHEMECONTROLLOADED_ARGS themeControlLoadedArgs = { };
3638 BA_FUNCTIONS_ONTHEMECONTROLLOADED_RESULTS themeControlLoadedResults = { };
3639
3640 if (WIXSTDBA_CONTROL_EULA_RICHEDIT == pArgs->pThemeControl->wId)
3641 {
3642 // Best effort to load the RTF EULA control with text.
3643 OnLoadedEulaRtfControl(pArgs->pThemeControl);
3644 fProcessed = TRUE;
3645 ExitFunction();
3646 }
3647
3648 if (m_pfnBAFunctionsProc)
3649 {
3650 themeControlLoadedArgs.cbSize = sizeof(themeControlLoadedArgs);
3651 themeControlLoadedArgs.wzName = pArgs->pThemeControl->sczName;
3652 themeControlLoadedArgs.wId = pArgs->pThemeControl->wId;
3653 themeControlLoadedArgs.hWnd = pArgs->pThemeControl->hWnd;
3654
3655 themeControlLoadedResults.cbSize = sizeof(themeControlLoadedResults);
3656
3657 hr = m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADED, &themeControlLoadedArgs, &themeControlLoadedResults, m_pvBAFunctionsProcContext);
3658
3659 if (E_NOTIMPL == hr)
3660 {
3661 hr = S_OK;
3662 }
3663 else
3664 {
3665 BalExitOnFailure(hr, "BAFunctions OnThemeControlLoaded failed.");
3666
3667 if (themeControlLoadedResults.fProcessed)
3668 {
3669 fProcessed = TRUE;
3670 }
3671 }
3672 }
3673
3674 LExit:
3675 pResults->hr = hr;
3676 return fProcessed || FAILED(hr);
3677 }
3678
3679 HRESULT OnLoadedEulaRtfControl(
3680 const THEME_CONTROL* pThemeControl
3681 )
3682 {
3683 HRESULT hr = S_OK;
3684 LPWSTR sczLicenseFormatted = NULL;
3685 LPWSTR sczLicensePath = NULL;
3686 LPWSTR sczLicenseDirectory = NULL;
3687 LPWSTR sczLicenseFilename = NULL;
3688
3689 if (!m_sczLicenseFile || !*m_sczLicenseFile)
3690 {
3691 ExitWithRootFailure(hr, E_INVALIDDATA, "No license file in manifest.");
3692 }
3693
3694 hr = StrAllocString(&sczLicenseFormatted, m_sczLicenseFile, 0);
3695 ExitOnFailure(hr, "Failed to copy manifest license file.");
3696
3697 hr = LocLocalizeString(m_pWixLoc, &sczLicenseFormatted);
3698 ExitOnFailure(hr, "Failed to localize manifest license file.");
3699
3700 hr = BalFormatString(sczLicenseFormatted, &sczLicenseFormatted);
3701 ExitOnFailure(hr, "Failed to expand localized manifest license file.");
3702
3703 hr = PathRelativeToModule(&sczLicensePath, sczLicenseFormatted, m_hModule);
3704 ExitOnFailure(hr, "Failed to get relative path for license file.");
3705
3706 hr = PathGetDirectory(sczLicensePath, &sczLicenseDirectory);
3707 ExitOnFailure(hr, "Failed to get license file directory.");
3708
3709 hr = StrAllocString(&sczLicenseFilename, PathFile(sczLicenseFormatted), 0);
3710 ExitOnFailure(hr, "Failed to copy license file name.");
3711
3712 hr = LocProbeForFile(sczLicenseDirectory, sczLicenseFilename, m_sczLanguage, &sczLicensePath);
3713 ExitOnFailure(hr, "Failed to probe for localized license file.");
3714
3715 hr = ThemeLoadRichEditFromFile(pThemeControl, sczLicensePath, m_hModule);
3716 ExitOnFailure(hr, "Failed to load license file into richedit control.");
3717
3718 LExit:
3719 if (FAILED(hr))
3720 {
3721 BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Failed to load file into license richedit control from path '%ls' manifest value: %ls", sczLicensePath, m_sczLicenseFile);
3722 }
3723
3724 ReleaseStr(sczLicenseFilename);
3725 ReleaseStr(sczLicenseDirectory);
3726 ReleaseStr(sczLicensePath);
3727 ReleaseStr(sczLicenseFormatted);
3728
3729 return hr;
3730 }
3731
3732
3733 //
3734 // OnShowFailure - display the failure page.
3735 //
3736 void OnShowFailure()
3737 {
3738 SetState(WIXSTDBA_STATE_FAILED, S_OK);
3739
3740 // If the UI should be visible, display it now and hide the splash screen
3741 if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay)
3742 {
3743 ::ShowWindow(m_pTheme->hwndParent, SW_SHOW);
3744 }
3745
3746 m_pEngine->CloseSplashScreen();
3747 }
3748
3749
3750 //
3751 // OnShowHelp - display the help page.
3752 //
3753 void OnShowHelp()
3754 {
3755 SetState(WIXSTDBA_STATE_HELP, S_OK);
3756
3757 // If the UI should be visible, display it now and hide the splash screen
3758 if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay)
3759 {
3760 ::ShowWindow(m_pTheme->hwndParent, SW_SHOW);
3761 }
3762
3763 m_pEngine->CloseSplashScreen();
3764 }
3765
3766
3767 //
3768 // OnDetect - start the processing of packages.
3769 //
3770 void OnDetect()
3771 {
3772 HRESULT hr = S_OK;
3773
3774 SetState(WIXSTDBA_STATE_DETECTING, hr);
3775
3776 // Tell the core we're ready for the packages to be processed now.
3777 hr = m_pEngine->Detect();
3778 BalExitOnFailure(hr, "Failed to start detecting chain.");
3779
3780 LExit:
3781 if (FAILED(hr))
3782 {
3783 SetState(WIXSTDBA_STATE_DETECTING, hr);
3784 }
3785 }
3786
3787
3788 //
3789 // OnPlan - plan the detected changes.
3790 //
3791 void OnPlan(
3792 __in BOOTSTRAPPER_ACTION action
3793 )
3794 {
3795 HRESULT hr = S_OK;
3796
3797 m_plannedAction = action;
3798
3799 SetState(WIXSTDBA_STATE_PLANNING, hr);
3800
3801 hr = m_pEngine->Plan(action);
3802 BalExitOnFailure(hr, "Failed to start planning packages.");
3803
3804 LExit:
3805 if (FAILED(hr))
3806 {
3807 SetState(WIXSTDBA_STATE_PLANNING, hr);
3808 }
3809 }
3810
3811
3812 //
3813 // OnPlanPrereqs - preplan the packages to see if the preqba can be skipped.
3814 //
3815 void OnPlanPrereqs(
3816 __in BOOTSTRAPPER_ACTION action
3817 )
3818 {
3819 HRESULT hr = S_OK;
3820
3821 m_plannedAction = action;
3822
3823 SetState(WIXSTDBA_STATE_PLANNING_PREREQS, hr);
3824
3825 hr = m_pEngine->Plan(action);
3826 BalExitOnFailure(hr, "Failed to start planning prereq packages.");
3827
3828 LExit:
3829 if (FAILED(hr))
3830 {
3831 SetState(WIXSTDBA_STATE_PLANNING_PREREQS, hr);
3832 }
3833 }
3834
3835
3836 //
3837 // OnApply - apply the packages.
3838 //
3839 void OnApply()
3840 {
3841 HRESULT hr = S_OK;
3842
3843 SetState(WIXSTDBA_STATE_APPLYING, hr);
3844 SetProgressState(hr);
3845 SetTaskbarButtonProgress(0);
3846
3847 hr = m_pEngine->Apply(m_hWnd);
3848 BalExitOnFailure(hr, "Failed to start applying packages.");
3849
3850 ThemeControlEnable(m_pControlProgressCancelButton, TRUE); // ensure the cancel button is enabled before starting.
3851
3852 LExit:
3853 if (FAILED(hr))
3854 {
3855 SetState(WIXSTDBA_STATE_APPLYING, hr);
3856 }
3857 }
3858
3859
3860 //
3861 // OnChangeState - change state.
3862 //
3863 void OnChangeState(
3864 __in WIXSTDBA_STATE state
3865 )
3866 {
3867 WIXSTDBA_STATE stateOld = m_state;
3868 DWORD dwOldPageId = 0;
3869 DWORD dwNewPageId = 0;
3870 LPWSTR sczText = NULL;
3871 LPWSTR sczUnformattedText = NULL;
3872 LPWSTR sczControlState = NULL;
3873 LPWSTR sczControlName = NULL;
3874
3875 m_state = state;
3876
3877 // If our install is at the end (success or failure) and we're not showing full UI or not updating or
3878 // we successfully installed the prerequisite(s) and either no restart is required or can automatically restart
3879 // then exit.
3880 if ((WIXSTDBA_STATE_APPLIED <= m_state && (BOOTSTRAPPER_DISPLAY_FULL > m_commandDisplay || BOOTSTRAPPER_ACTION_UPDATE_REPLACE == m_plannedAction)) ||
3881 (WIXSTDBA_STATE_APPLIED == m_state && m_fPrereq && (!m_fRestartRequired || m_fShouldRestart && m_fAllowRestart)))
3882 {
3883 // Quietly exit.
3884 ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0);
3885 }
3886 else // try to change the pages.
3887 {
3888 DeterminePageId(stateOld, &dwOldPageId);
3889 DeterminePageId(m_state, &dwNewPageId);
3890
3891 if (dwOldPageId != dwNewPageId)
3892 {
3893 LONGLONG llCanRestart = 0;
3894 LONGLONG llElevated = 0;
3895
3896 BalGetNumericVariable(WIXBUNDLE_VARIABLE_CANRESTART, &llCanRestart);
3897 BalGetNumericVariable(WIXBUNDLE_VARIABLE_ELEVATED, &llElevated);
3898 m_fRestartRequiresElevation = !llCanRestart && !llElevated;
3899
3900 // Enable disable controls per-page.
3901 if (m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL] == dwNewPageId) // on the "Install" page, ensure the install button is enabled/disabled correctly.
3902 {
3903 ThemeControlElevates(m_pControlInstallButton, (m_Bundle.fPerMachine && !llElevated));
3904
3905 // If the EULA control exists, show it only if a license URL is provided as well.
3906 if (m_pControlEulaHyperlink)
3907 {
3908 BOOL fEulaLink = (m_sczLicenseUrl && *m_sczLicenseUrl);
3909 ThemeControlEnable(m_pControlEulaHyperlink, fEulaLink);
3910 ThemeControlEnable(m_pControlEulaAcceptCheckbox, fEulaLink);
3911 }
3912
3913 BOOL fAcceptedLicense = !m_pControlEulaAcceptCheckbox || !ThemeControlEnabled(m_pControlEulaAcceptCheckbox) || ThemeIsControlChecked(m_pControlEulaAcceptCheckbox);
3914 ThemeControlEnable(m_pControlInstallButton, fAcceptedLicense);
3915 }
3916 else if (m_rgdwPageIds[WIXSTDBA_PAGE_MODIFY] == dwNewPageId)
3917 {
3918 ThemeControlElevates(m_pControlRepairButton, (m_Bundle.fPerMachine && !llElevated));
3919 ThemeControlElevates(m_pControlUninstallButton, (m_Bundle.fPerMachine && !llElevated));
3920
3921 ThemeControlEnable(m_pControlRepairButton, !m_fSuppressRepair);
3922 }
3923 else if (m_rgdwPageIds[WIXSTDBA_PAGE_SUCCESS] == dwNewPageId) // on the "Success" page, check if the restart or launch button should be enabled.
3924 {
3925 BOOL fEnableRestartButton = FALSE;
3926 BOOL fLaunchTargetExists = FALSE;
3927
3928 ThemeControlElevates(m_pControlSuccessRestartButton, m_fRestartRequiresElevation);
3929
3930 if (m_fShouldRestart)
3931 {
3932 if (BAL_INFO_RESTART_PROMPT == m_BalInfoCommand.restart)
3933 {
3934 fEnableRestartButton = TRUE;
3935 }
3936 }
3937 else if (m_pControlLaunchButton)
3938 {
3939 fLaunchTargetExists = BalVariableExists(WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH);
3940 }
3941
3942 ThemeControlEnable(m_pControlLaunchButton, fLaunchTargetExists && BOOTSTRAPPER_ACTION_UNINSTALL < m_plannedAction);
3943 ThemeControlEnable(m_pControlSuccessRestartButton, fEnableRestartButton);
3944 }
3945 else if (m_rgdwPageIds[WIXSTDBA_PAGE_FAILURE] == dwNewPageId) // on the "Failure" page, show error message and check if the restart button should be enabled.
3946 {
3947 BOOL fShowLogLink = (m_Bundle.sczLogVariable && *m_Bundle.sczLogVariable); // if there is a log file variable then we'll assume the log file exists.
3948 BOOL fShowErrorMessage = FALSE;
3949 BOOL fEnableRestartButton = FALSE;
3950
3951 ThemeControlElevates(m_pControlFailureRestartButton, m_fRestartRequiresElevation);
3952
3953 if (FAILED(m_hrFinal))
3954 {
3955 // If we know the failure message, use that.
3956 if (m_sczFailedMessage && *m_sczFailedMessage)
3957 {
3958 StrAllocString(&sczUnformattedText, m_sczFailedMessage, 0);
3959 }
3960 else if (E_PREREQBA_INFINITE_LOOP == m_hrFinal)
3961 {
3962 HRESULT hr = StrAllocString(&sczUnformattedText, L"#(loc.PREREQBAINFINITELOOPErrorMessage)", 0);
3963 if (FAILED(hr))
3964 {
3965 BalLogError(hr, "Failed to initialize PREREQBAINFINITELOOPErrorMessage loc identifier.");
3966 }
3967 else
3968 {
3969 hr = LocLocalizeString(m_pWixLoc, &sczUnformattedText);
3970 if (FAILED(hr))
3971 {
3972 BalLogError(hr, "Failed to localize PREREQBAINFINITELOOPErrorMessage: %ls", sczUnformattedText);
3973 ReleaseNullStr(sczUnformattedText);
3974 }
3975 }
3976 }
3977 else // try to get the error message from the error code.
3978 {
3979 StrAllocFromError(&sczUnformattedText, m_hrFinal, NULL);
3980 if (!sczUnformattedText || !*sczUnformattedText)
3981 {
3982 StrAllocFromError(&sczUnformattedText, E_FAIL, NULL);
3983 }
3984 }
3985
3986 if (E_WIXSTDBA_CONDITION_FAILED == m_hrFinal)
3987 {
3988 if (sczUnformattedText)
3989 {
3990 StrAllocString(&sczText, sczUnformattedText, 0);
3991 }
3992 }
3993 else if (E_PREREQBA_INFINITE_LOOP == m_hrFinal)
3994 {
3995 if (sczUnformattedText)
3996 {
3997 BalFormatString(sczUnformattedText, &sczText);
3998 }
3999 }
4000 else
4001 {
4002 StrAllocFormatted(&sczText, L"0x%08x - %ls", m_hrFinal, sczUnformattedText);
4003 }
4004
4005 ThemeSetTextControl(m_pControlFailureMessageText, sczText);
4006 fShowErrorMessage = TRUE;
4007 }
4008
4009 if (m_fShouldRestart)
4010 {
4011 if (BAL_INFO_RESTART_PROMPT == m_BalInfoCommand.restart)
4012 {
4013 fEnableRestartButton = TRUE;
4014 }
4015 }
4016
4017 ThemeControlEnable(m_pControlFailureLogFileLink, fShowLogLink);
4018 ThemeControlEnable(m_pControlFailureMessageText, fShowErrorMessage);
4019 ThemeControlEnable(m_pControlFailureRestartButton, fEnableRestartButton);
4020 }
4021
4022 HRESULT hr = ThemeShowPage(m_pTheme, dwOldPageId, SW_HIDE);
4023 if (FAILED(hr))
4024 {
4025 BalLogError(hr, "Failed to hide page: %u", dwOldPageId);
4026 }
4027
4028 hr = ThemeShowPage(m_pTheme, dwNewPageId, SW_SHOW);
4029 if (FAILED(hr))
4030 {
4031 BalLogError(hr, "Failed to show page: %u", dwNewPageId);
4032 }
4033
4034 // On the install page set the focus to the install button or the next enabled control if install is disabled.
4035 if (m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL] == dwNewPageId)
4036 {
4037 ThemeSetFocus(m_pControlInstallButton);
4038 }
4039 }
4040 }
4041
4042 ReleaseStr(sczText);
4043 ReleaseStr(sczUnformattedText);
4044 ReleaseStr(sczControlState);
4045 ReleaseStr(sczControlName);
4046 }
4047
4048
4049 //
4050 // OnClose - called when the window is trying to be closed.
4051 //
4052 BOOL OnClose()
4053 {
4054 BOOL fClose = FALSE;
4055 BOOL fCancel = FALSE;
4056
4057 // If we've already succeeded or failed or showing the help page, just close (prompts are annoying if the bootstrapper is done).
4058 if (WIXSTDBA_STATE_APPLIED <= m_state || WIXSTDBA_STATE_HELP == m_state)
4059 {
4060 fClose = TRUE;
4061 }
4062 else // prompt the user or force the cancel if there is no UI.
4063 {
4064 ::EnterCriticalSection(&m_csShowingInternalUiThisPackage);
4065 fClose = PromptCancel(
4066 m_hWnd,
4067 BOOTSTRAPPER_DISPLAY_FULL != m_commandDisplay || m_fShowingInternalUiThisPackage,
4068 m_sczConfirmCloseMessage ? m_sczConfirmCloseMessage : L"Are you sure you want to cancel?",
4069 m_pTheme->sczCaption);
4070 ::LeaveCriticalSection(&m_csShowingInternalUiThisPackage);
4071
4072 fCancel = fClose;
4073 }
4074
4075 // If we're doing progress then we never close, we just cancel to let rollback occur.
4076 if (WIXSTDBA_STATE_APPLYING <= m_state && WIXSTDBA_STATE_APPLIED > m_state)
4077 {
4078 // If we canceled, disable cancel button since clicking it again is silly.
4079 if (fClose)
4080 {
4081 ThemeControlEnable(m_pControlProgressCancelButton, FALSE);
4082 }
4083
4084 fClose = FALSE;
4085 }
4086
4087 if (fClose)
4088 {
4089 DWORD dwCurrentPageId = 0;
4090 DeterminePageId(m_state, &dwCurrentPageId);
4091
4092 // Hide the current page to let thmutil do its thing with variables.
4093 ThemeShowPageEx(m_pTheme, dwCurrentPageId, SW_HIDE, fCancel ? THEME_SHOW_PAGE_REASON_CANCEL : THEME_SHOW_PAGE_REASON_DEFAULT);
4094 }
4095
4096 return fClose;
4097 }
4098
4099
4100 //
4101 // OnClickAcceptCheckbox - allow the install to continue.
4102 //
4103 void OnClickAcceptCheckbox()
4104 {
4105 BOOL fAcceptedLicense = ThemeIsControlChecked(m_pControlEulaAcceptCheckbox);
4106 ThemeControlEnable(m_pControlInstallButton, fAcceptedLicense);
4107 }
4108
4109
4110 //
4111 // OnClickInstallButton - start the install by planning the packages.
4112 //
4113 void OnClickInstallButton()
4114 {
4115 this->OnPlan(BOOTSTRAPPER_ACTION_INSTALL);
4116 }
4117
4118
4119 //
4120 // OnClickRepairButton - start the repair.
4121 //
4122 void OnClickRepairButton()
4123 {
4124 this->OnPlan(BOOTSTRAPPER_ACTION_REPAIR);
4125 }
4126
4127
4128 //
4129 // OnClickUninstallButton - start the uninstall.
4130 //
4131 void OnClickUninstallButton()
4132 {
4133 this->OnPlan(BOOTSTRAPPER_ACTION_UNINSTALL);
4134 }
4135
4136
4137 //
4138 // OnClickUpdateButton - start the update process.
4139 //
4140 void OnClickUpdateButton()
4141 {
4142 this->OnPlan(BOOTSTRAPPER_ACTION_UPDATE_REPLACE);
4143 }
4144
4145
4146 //
4147 // OnClickCloseButton - close the application.
4148 //
4149 void OnClickCloseButton()
4150 {
4151 ::SendMessageW(m_hWnd, WM_CLOSE, 0, 0);
4152 }
4153
4154
4155 //
4156 // OnClickEulaLink - show the end user license agreement.
4157 //
4158 void OnClickEulaLink()
4159 {
4160 HRESULT hr = S_OK;
4161 LPWSTR sczLicenseUrl = NULL;
4162 LPWSTR sczLicensePath = NULL;
4163 LPWSTR sczLicenseDirectory = NULL;
4164 LPWSTR sczLicenseFilename = NULL;
4165 URI_PROTOCOL protocol = URI_PROTOCOL_UNKNOWN;
4166
4167 hr = StrAllocString(&sczLicenseUrl, m_sczLicenseUrl, 0);
4168 BalExitOnFailure(hr, "Failed to copy license URL: %ls", m_sczLicenseUrl);
4169
4170 hr = LocLocalizeString(m_pWixLoc, &sczLicenseUrl);
4171 BalExitOnFailure(hr, "Failed to localize license URL: %ls", m_sczLicenseUrl);
4172
4173 // Assume there is no hidden variables to be formatted
4174 // so don't worry about securely freeing it.
4175 hr = BalFormatString(sczLicenseUrl, &sczLicenseUrl);
4176 BalExitOnFailure(hr, "Failed to get formatted license URL: %ls", m_sczLicenseUrl);
4177
4178 hr = UriProtocol(sczLicenseUrl, &protocol);
4179 if (FAILED(hr) || URI_PROTOCOL_UNKNOWN == protocol)
4180 {
4181 // Probe for localized license file
4182 hr = PathRelativeToModule(&sczLicensePath, sczLicenseUrl, m_hModule);
4183 if (SUCCEEDED(hr))
4184 {
4185 hr = PathGetDirectory(sczLicensePath, &sczLicenseDirectory);
4186 if (SUCCEEDED(hr))
4187 {
4188 hr = LocProbeForFile(sczLicenseDirectory, PathFile(sczLicenseUrl), m_sczLanguage, &sczLicensePath);
4189 }
4190 }
4191 }
4192
4193 hr = ShelExecUnelevated(sczLicensePath ? sczLicensePath : sczLicenseUrl, NULL, L"open", NULL, SW_SHOWDEFAULT);
4194 BalExitOnFailure(hr, "Failed to launch URL to EULA.");
4195
4196 LExit:
4197 ReleaseStr(sczLicensePath);
4198 ReleaseStr(sczLicenseUrl);
4199 ReleaseStr(sczLicenseDirectory);
4200 ReleaseStr(sczLicenseFilename);
4201 }
4202
4203
4204 //
4205 // OnClickLaunchButton - launch the app from the success page.
4206 //
4207 void OnClickLaunchButton()
4208 {
4209 HRESULT hr = S_OK;
4210 LPWSTR sczUnformattedLaunchTarget = NULL;
4211 LPWSTR sczLaunchTarget = NULL;
4212 LPWSTR sczLaunchTargetElevatedId = NULL;
4213 LPWSTR sczUnformattedArguments = NULL;
4214 LPWSTR sczArguments = NULL;
4215 LPWSTR sczUnformattedLaunchFolder = NULL;
4216 LPWSTR sczLaunchFolder = NULL;
4217 int nCmdShow = SW_SHOWNORMAL;
4218
4219 hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH, &sczUnformattedLaunchTarget);
4220 BalExitOnFailure(hr, "Failed to get launch target variable '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH);
4221
4222 hr = BalFormatString(sczUnformattedLaunchTarget, &sczLaunchTarget);
4223 BalExitOnFailure(hr, "Failed to format launch target variable: %ls", sczUnformattedLaunchTarget);
4224
4225 if (BalVariableExists(WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID))
4226 {
4227 hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID, &sczLaunchTargetElevatedId);
4228 BalExitOnFailure(hr, "Failed to get launch target elevated id '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID);
4229 }
4230
4231 if (BalVariableExists(WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS))
4232 {
4233 hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS, &sczUnformattedArguments);
4234 BalExitOnFailure(hr, "Failed to get launch arguments '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS);
4235 }
4236
4237 if (BalVariableExists(WIXSTDBA_VARIABLE_LAUNCH_HIDDEN))
4238 {
4239 nCmdShow = SW_HIDE;
4240 }
4241
4242 if (BalVariableExists(WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER))
4243 {
4244 hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER, &sczUnformattedLaunchFolder);
4245 BalExitOnFailure(hr, "Failed to get launch working directory variable '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER);
4246 }
4247
4248 if (sczLaunchTargetElevatedId && !m_fTriedToLaunchElevated)
4249 {
4250 m_fTriedToLaunchElevated = TRUE;
4251 hr = m_pEngine->LaunchApprovedExe(m_hWnd, sczLaunchTargetElevatedId, sczUnformattedArguments, 0);
4252 if (FAILED(hr))
4253 {
4254 BalLogError(hr, "Failed to launch elevated target: %ls", sczLaunchTargetElevatedId);
4255
4256 //try with ShelExec next time
4257 OnClickLaunchButton();
4258 }
4259 }
4260 else
4261 {
4262 if (sczUnformattedArguments)
4263 {
4264 hr = BalFormatString(sczUnformattedArguments, &sczArguments);
4265 BalExitOnFailure(hr, "Failed to format launch arguments variable: %ls", sczUnformattedArguments);
4266 }
4267
4268 if (sczUnformattedLaunchFolder)
4269 {
4270 hr = BalFormatString(sczUnformattedLaunchFolder, &sczLaunchFolder);
4271 BalExitOnFailure(hr, "Failed to format launch working directory variable: %ls", sczUnformattedLaunchFolder);
4272 }
4273
4274 hr = ShelExec(sczLaunchTarget, sczArguments, L"open", sczLaunchFolder, nCmdShow, m_hWnd, NULL);
4275 BalExitOnFailure(hr, "Failed to launch target: %ls", sczLaunchTarget);
4276
4277 ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0);
4278 }
4279
4280 LExit:
4281 StrSecureZeroFreeString(sczLaunchFolder);
4282 ReleaseStr(sczUnformattedLaunchFolder);
4283 StrSecureZeroFreeString(sczArguments);
4284 ReleaseStr(sczUnformattedArguments);
4285 ReleaseStr(sczLaunchTargetElevatedId);
4286 StrSecureZeroFreeString(sczLaunchTarget);
4287 ReleaseStr(sczUnformattedLaunchTarget);
4288 }
4289
4290
4291 //
4292 // OnClickRestartButton - allows the restart and closes the app.
4293 //
4294 void OnClickRestartButton()
4295 {
4296 AssertSz(m_fRestartRequired, "Restart must be requested to be able to click on the restart button.");
4297
4298 if (m_fRestartRequiresElevation)
4299 {
4300 m_fElevatingForRestart = TRUE;
4301 ThemeControlEnable(m_pControlFailureRestartButton, FALSE);
4302 ThemeControlEnable(m_pControlSuccessRestartButton, FALSE);
4303
4304 m_pEngine->Elevate(m_hWnd);
4305 }
4306 else
4307 {
4308 m_fAllowRestart = TRUE;
4309
4310 ::SendMessageW(m_hWnd, WM_CLOSE, 0, 0);
4311 }
4312 }
4313
4314
4315 //
4316 // OnClickLogFileLink - show the log file.
4317 //
4318 void OnClickLogFileLink()
4319 {
4320 HRESULT hr = S_OK;
4321 LPWSTR sczLogFile = NULL;
4322
4323 hr = BalGetStringVariable(m_Bundle.sczLogVariable, &sczLogFile);
4324 BalExitOnFailure(hr, "Failed to get log file variable '%ls'.", m_Bundle.sczLogVariable);
4325
4326 hr = ShelExecUnelevated(L"notepad.exe", sczLogFile, L"open", NULL, SW_SHOWDEFAULT);
4327 BalExitOnFailure(hr, "Failed to open log file target: %ls", sczLogFile);
4328
4329 LExit:
4330 ReleaseStr(sczLogFile);
4331 }
4332
4333 BOOL OnThemeControlWmCommand(
4334 __in const THEME_CONTROLWMCOMMAND_ARGS* pArgs,
4335 __in THEME_CONTROLWMCOMMAND_RESULTS* pResults
4336 )
4337 {
4338 HRESULT hr = S_OK;
4339 BOOL fProcessed = FALSE;
4340 BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_ARGS themeControlWmCommandArgs = { };
4341 BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_RESULTS themeControlWmCommandResults = { };
4342
4343 switch (HIWORD(pArgs->wParam))
4344 {
4345 case BN_CLICKED:
4346 switch (pArgs->pThemeControl->wId)
4347 {
4348 case WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX:
4349 OnClickAcceptCheckbox();
4350 fProcessed = TRUE;
4351 pResults->lResult = 0;
4352 ExitFunction();
4353
4354 case WIXSTDBA_CONTROL_INSTALL_BUTTON:
4355 OnClickInstallButton();
4356 fProcessed = TRUE;
4357 pResults->lResult = 0;
4358 ExitFunction();
4359
4360 case WIXSTDBA_CONTROL_REPAIR_BUTTON:
4361 OnClickRepairButton();
4362 fProcessed = TRUE;
4363 pResults->lResult = 0;
4364 ExitFunction();
4365
4366 case WIXSTDBA_CONTROL_UNINSTALL_BUTTON:
4367 OnClickUninstallButton();
4368 fProcessed = TRUE;
4369 pResults->lResult = 0;
4370 ExitFunction();
4371
4372 case WIXSTDBA_CONTROL_INSTALL_UPDATE_BUTTON:
4373 case WIXSTDBA_CONTROL_MODIFY_UPDATE_BUTTON:
4374 OnClickUpdateButton();
4375 fProcessed = TRUE;
4376 pResults->lResult = 0;
4377 ExitFunction();
4378
4379 case WIXSTDBA_CONTROL_LAUNCH_BUTTON:
4380 OnClickLaunchButton();
4381 fProcessed = TRUE;
4382 pResults->lResult = 0;
4383 ExitFunction();
4384
4385 case WIXSTDBA_CONTROL_SUCCESS_RESTART_BUTTON: __fallthrough;
4386 case WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON:
4387 OnClickRestartButton();
4388 fProcessed = TRUE;
4389 pResults->lResult = 0;
4390 ExitFunction();
4391
4392 case WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON:
4393 OnClickCloseButton();
4394 fProcessed = TRUE;
4395 pResults->lResult = 0;
4396 ExitFunction();
4397 }
4398 break;
4399 }
4400
4401 if (m_pfnBAFunctionsProc)
4402 {
4403 themeControlWmCommandArgs.cbSize = sizeof(themeControlWmCommandArgs);
4404 themeControlWmCommandArgs.wParam = pArgs->wParam;
4405 themeControlWmCommandArgs.wzName = pArgs->pThemeControl->sczName;
4406 themeControlWmCommandArgs.wId = pArgs->pThemeControl->wId;
4407 themeControlWmCommandArgs.hWnd = pArgs->pThemeControl->hWnd;
4408
4409 themeControlWmCommandResults.cbSize = sizeof(themeControlWmCommandResults);
4410 themeControlWmCommandResults.lResult = pResults->lResult;
4411
4412 hr = m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMCOMMAND, &themeControlWmCommandArgs, &themeControlWmCommandResults, m_pvBAFunctionsProcContext);
4413 if (E_NOTIMPL != hr)
4414 {
4415 BalExitOnFailure(hr, "BAFunctions OnThemeControlWmCommand failed.");
4416
4417 if (themeControlWmCommandResults.fProcessed)
4418 {
4419 fProcessed = TRUE;
4420 pResults->lResult = themeControlWmCommandResults.lResult;
4421 ExitFunction();
4422 }
4423 }
4424 }
4425
4426LExit:
4427 return fProcessed;
4428 }
4429
4430 BOOL OnThemeControlWmNotify(
4431 __in const THEME_CONTROLWMNOTIFY_ARGS* pArgs,
4432 __in THEME_CONTROLWMNOTIFY_RESULTS* pResults
4433 )
4434 {
4435 HRESULT hr = S_OK;
4436 BOOL fProcessed = FALSE;
4437 BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_ARGS themeControlWmNotifyArgs = { };
4438 BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_RESULTS themeControlWmNotifyResults = { };
4439
4440 switch (pArgs->lParam->code)
4441 {
4442 case NM_CLICK: __fallthrough;
4443 case NM_RETURN:
4444 switch (pArgs->pThemeControl->wId)
4445 {
4446 case WIXSTDBA_CONTROL_EULA_LINK:
4447 OnClickEulaLink();
4448 fProcessed = TRUE;
4449 pResults->lResult = 1;
4450 ExitFunction();
4451 case WIXSTDBA_CONTROL_FAILURE_LOGFILE_LINK:
4452 OnClickLogFileLink();
4453 fProcessed = TRUE;
4454 pResults->lResult = 1;
4455 ExitFunction();
4456 }
4457 }
4458
4459 if (m_pfnBAFunctionsProc)
4460 {
4461 themeControlWmNotifyArgs.cbSize = sizeof(themeControlWmNotifyArgs);
4462 themeControlWmNotifyArgs.lParam = pArgs->lParam;
4463 themeControlWmNotifyArgs.wzName = pArgs->pThemeControl->sczName;
4464 themeControlWmNotifyArgs.wId = pArgs->pThemeControl->wId;
4465 themeControlWmNotifyArgs.hWnd = pArgs->pThemeControl->hWnd;
4466
4467 themeControlWmNotifyResults.cbSize = sizeof(themeControlWmNotifyResults);
4468 themeControlWmNotifyResults.lResult = pResults->lResult;
4469
4470 hr = m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMCOMMAND, &themeControlWmNotifyArgs, &themeControlWmNotifyResults, m_pvBAFunctionsProcContext);
4471 if (E_NOTIMPL != hr)
4472 {
4473 BalExitOnFailure(hr, "BAFunctions OnThemeControlWmNotify failed.");
4474
4475 if (themeControlWmNotifyResults.fProcessed)
4476 {
4477 fProcessed = TRUE;
4478 pResults->lResult = themeControlWmNotifyResults.lResult;
4479 ExitFunction();
4480 }
4481 }
4482 }
4483
4484LExit:
4485 return fProcessed;
4486 }
4487
4488
4489 //
4490 // SetState
4491 //
4492 void SetState(
4493 __in WIXSTDBA_STATE state,
4494 __in HRESULT hrStatus
4495 )
4496 {
4497#ifdef DEBUG
4498 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: SetState() - setting state to %u with status 0x%08x.", state, hrStatus);
4499#endif
4500
4501 if (FAILED(hrStatus))
4502 {
4503 m_hrFinal = hrStatus;
4504 }
4505
4506 if (FAILED(m_hrFinal))
4507 {
4508 state = WIXSTDBA_STATE_FAILED;
4509 }
4510
4511 if (m_state < state)
4512 {
4513 ::PostMessageW(m_hWnd, WM_WIXSTDBA_CHANGE_STATE, 0, state);
4514 }
4515 }
4516
4517
4518 void DeterminePageId(
4519 __in WIXSTDBA_STATE state,
4520 __out DWORD* pdwPageId
4521 )
4522 {
4523 if (BOOTSTRAPPER_DISPLAY_PASSIVE == m_commandDisplay)
4524 {
4525 switch (state)
4526 {
4527 case WIXSTDBA_STATE_INITIALIZED:
4528 *pdwPageId = BOOTSTRAPPER_ACTION_HELP == m_commandAction ? m_rgdwPageIds[WIXSTDBA_PAGE_HELP] : m_rgdwPageIds[WIXSTDBA_PAGE_LOADING];
4529 break;
4530
4531 case WIXSTDBA_STATE_HELP:
4532 *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_HELP];
4533 break;
4534
4535 case WIXSTDBA_STATE_DETECTING:
4536 *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_LOADING] ? m_rgdwPageIds[WIXSTDBA_PAGE_LOADING] : m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] ? m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] : m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS];
4537 break;
4538
4539 case WIXSTDBA_STATE_DETECTED: __fallthrough;
4540 case WIXSTDBA_STATE_PLANNING_PREREQS: __fallthrough;
4541 case WIXSTDBA_STATE_PLANNED_PREREQS: __fallthrough;
4542 case WIXSTDBA_STATE_PLANNING: __fallthrough;
4543 case WIXSTDBA_STATE_PLANNED: __fallthrough;
4544 case WIXSTDBA_STATE_APPLYING: __fallthrough;
4545 case WIXSTDBA_STATE_CACHING: __fallthrough;
4546 case WIXSTDBA_STATE_CACHED: __fallthrough;
4547 case WIXSTDBA_STATE_EXECUTING: __fallthrough;
4548 case WIXSTDBA_STATE_EXECUTED:
4549 *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] ? m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] : m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS];
4550 break;
4551
4552 default:
4553 *pdwPageId = 0;
4554 break;
4555 }
4556 }
4557 else if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay)
4558 {
4559 switch (state)
4560 {
4561 case WIXSTDBA_STATE_INITIALIZING:
4562 *pdwPageId = 0;
4563 break;
4564
4565 case WIXSTDBA_STATE_INITIALIZED:
4566 *pdwPageId = BOOTSTRAPPER_ACTION_HELP == m_commandAction ? m_rgdwPageIds[WIXSTDBA_PAGE_HELP] : m_rgdwPageIds[WIXSTDBA_PAGE_LOADING];
4567 break;
4568
4569 case WIXSTDBA_STATE_HELP:
4570 *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_HELP];
4571 break;
4572
4573 case WIXSTDBA_STATE_DETECTING:
4574 *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_LOADING];
4575 break;
4576
4577 case WIXSTDBA_STATE_DETECTED:
4578 case WIXSTDBA_STATE_PLANNING_PREREQS: __fallthrough;
4579 case WIXSTDBA_STATE_PLANNED_PREREQS: __fallthrough;
4580 switch (m_commandAction)
4581 {
4582 case BOOTSTRAPPER_ACTION_INSTALL:
4583 *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL];
4584 break;
4585
4586 case BOOTSTRAPPER_ACTION_MODIFY: __fallthrough;
4587 case BOOTSTRAPPER_ACTION_REPAIR: __fallthrough;
4588 case BOOTSTRAPPER_ACTION_UNINSTALL:
4589 *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_MODIFY];
4590 break;
4591 }
4592 break;
4593
4594 case WIXSTDBA_STATE_PLANNING: __fallthrough;
4595 case WIXSTDBA_STATE_PLANNED: __fallthrough;
4596 case WIXSTDBA_STATE_APPLYING: __fallthrough;
4597 case WIXSTDBA_STATE_CACHING: __fallthrough;
4598 case WIXSTDBA_STATE_CACHED: __fallthrough;
4599 case WIXSTDBA_STATE_EXECUTING: __fallthrough;
4600 case WIXSTDBA_STATE_EXECUTED:
4601 *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS];
4602 break;
4603
4604 case WIXSTDBA_STATE_APPLIED:
4605 *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_SUCCESS];
4606 break;
4607
4608 case WIXSTDBA_STATE_FAILED:
4609 *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_FAILURE];
4610 break;
4611 }
4612 }
4613 }
4614
4615
4616 HRESULT EvaluateConditions()
4617 {
4618 HRESULT hr = S_OK;
4619 BOOL fResult = FALSE;
4620
4621 for (DWORD i = 0; i < m_Conditions.cConditions; ++i)
4622 {
4623 BAL_CONDITION* pCondition = m_Conditions.rgConditions + i;
4624
4625 hr = BalConditionEvaluate(pCondition, m_pEngine, &fResult, &m_sczFailedMessage);
4626 BalExitOnFailure(hr, "Failed to evaluate condition.");
4627
4628 if (!fResult)
4629 {
4630 hr = E_WIXSTDBA_CONDITION_FAILED;
4631 BalExitOnFailure(hr, "%ls", m_sczFailedMessage);
4632 }
4633 }
4634
4635 ReleaseNullStrSecure(m_sczFailedMessage);
4636
4637 LExit:
4638 return hr;
4639 }
4640
4641 void UpdateCacheProgress(
4642 __in DWORD dwOverallPercentage
4643 )
4644 {
4645 WCHAR wzProgress[5] = { };
4646
4647 ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallPercentage);
4648 ThemeSetTextControl(m_pControlCacheProgressText, wzProgress);
4649
4650 ThemeSetProgressControl(m_pControlCacheProgressbar, dwOverallPercentage);
4651
4652 m_dwCalculatedCacheProgress = dwOverallPercentage * WIXSTDBA_ACQUIRE_PERCENTAGE / 100;
4653 ThemeSetProgressControl(m_pControlOverallCalculatedProgressbar, m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress);
4654
4655 SetTaskbarButtonProgress(m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress);
4656 }
4657
4658
4659 void SetTaskbarButtonProgress(
4660 __in DWORD dwOverallPercentage
4661 )
4662 {
4663 HRESULT hr = S_OK;
4664
4665 if (m_fTaskbarButtonOK)
4666 {
4667 hr = m_pTaskbarList->SetProgressValue(m_hWnd, dwOverallPercentage, 100UL);
4668 BalExitOnFailure(hr, "Failed to set taskbar button progress to: %d%%.", dwOverallPercentage);
4669 }
4670
4671 LExit:
4672 return;
4673 }
4674
4675
4676 void SetTaskbarButtonState(
4677 __in TBPFLAG tbpFlags
4678 )
4679 {
4680 HRESULT hr = S_OK;
4681
4682 if (m_fTaskbarButtonOK)
4683 {
4684 hr = m_pTaskbarList->SetProgressState(m_hWnd, tbpFlags);
4685 BalExitOnFailure(hr, "Failed to set taskbar button state: %d.", tbpFlags);
4686 }
4687
4688 LExit:
4689 return;
4690 }
4691
4692
4693 void SetProgressState(
4694 __in HRESULT hrStatus
4695 )
4696 {
4697 TBPFLAG flag = TBPF_NORMAL;
4698
4699 if (IsCanceled() || HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT) == hrStatus)
4700 {
4701 flag = TBPF_PAUSED;
4702 }
4703 else if (IsRollingBack() || FAILED(hrStatus))
4704 {
4705 flag = TBPF_ERROR;
4706 }
4707
4708 SetTaskbarButtonState(flag);
4709 }
4710
4711
4712 HRESULT LoadBAFunctions(
4713 __in IXMLDOMDocument* pixdManifest,
4714 __in BOOTSTRAPPER_COMMAND* pCommand
4715 )
4716 {
4717 HRESULT hr = S_OK;
4718 IXMLDOMNode* pBAFunctionsNode = NULL;
4719 LPWSTR sczBafName = NULL;
4720 LPWSTR sczBafPath = NULL;
4721 BA_FUNCTIONS_CREATE_ARGS bafCreateArgs = { };
4722 BA_FUNCTIONS_CREATE_RESULTS bafCreateResults = { };
4723 BOOL fXmlFound = FALSE;
4724
4725 hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixBalBAFunctions", &pBAFunctionsNode);
4726 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to read WixBalBAFunctions node from BootstrapperApplicationData.xml.");
4727
4728 if (!fXmlFound)
4729 {
4730 ExitFunction();
4731 }
4732
4733 hr = XmlGetAttributeEx(pBAFunctionsNode, L"FilePath", &sczBafName);
4734 BalExitOnRequiredXmlQueryFailure(hr, "Failed to get BAFunctions FilePath.");
4735
4736 hr = PathRelativeToModule(&sczBafPath, sczBafName, m_hModule);
4737 BalExitOnFailure(hr, "Failed to get path to BAFunctions DLL.");
4738
4739 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: LoadBAFunctions() - BAFunctions DLL %ls", sczBafPath);
4740
4741 m_hBAFModule = ::LoadLibraryExW(sczBafPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
4742 BalExitOnNullWithLastError(m_hBAFModule, hr, "WIXSTDBA: LoadBAFunctions() - Failed to load DLL %ls", sczBafPath);
4743
4744 PFN_BA_FUNCTIONS_CREATE pfnBAFunctionsCreate = reinterpret_cast<PFN_BA_FUNCTIONS_CREATE>(::GetProcAddress(m_hBAFModule, "BAFunctionsCreate"));
4745 BalExitOnNullWithLastError(pfnBAFunctionsCreate, hr, "Failed to get BAFunctionsCreate entry-point from: %ls", sczBafPath);
4746
4747 bafCreateArgs.cbSize = sizeof(bafCreateArgs);
4748 bafCreateArgs.qwBAFunctionsAPIVersion = MAKEQWORDVERSION(2024, 1, 1, 0);
4749 bafCreateArgs.pEngine = m_pEngine;
4750 bafCreateArgs.pCommand = pCommand;
4751
4752 bafCreateResults.cbSize = sizeof(bafCreateResults);
4753
4754 hr = pfnBAFunctionsCreate(&bafCreateArgs, &bafCreateResults);
4755 BalExitOnFailure(hr, "Failed to create BAFunctions.");
4756
4757 m_pfnBAFunctionsProc = bafCreateResults.pfnBAFunctionsProc;
4758 m_pvBAFunctionsProcContext = bafCreateResults.pvBAFunctionsProcContext;
4759
4760 LExit:
4761 if (m_hBAFModule && !m_pfnBAFunctionsProc)
4762 {
4763 ::FreeLibrary(m_hBAFModule);
4764 m_hBAFModule = NULL;
4765 }
4766 ReleaseStr(sczBafPath);
4767 ReleaseStr(sczBafName);
4768 ReleaseObject(pBAFunctionsNode);
4769
4770 return hr;
4771 }
4772
4773
4774public:
4775 //
4776 // Constructor - initialize member variables.
4777 //
4778 CWixStandardBootstrapperApplication(
4779 __in HMODULE hModule,
4780 __in BOOL fRunAsPrereqBA
4781 ) : CBalBaseBootstrapperApplication(3, 3000)
4782 {
4783 THEME_ASSIGN_CONTROL_ID* pAssignControl = NULL;
4784 DWORD dwAutomaticBehaviorType = THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ENABLED | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VISIBLE | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ACTION | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VALUE;
4785
4786 m_hModule = hModule;
4787 m_commandAction = BOOTSTRAPPER_ACTION_UNKNOWN;
4788 m_commandDisplay = BOOTSTRAPPER_DISPLAY_UNKNOWN;
4789 m_commandResumeType = BOOTSTRAPPER_RESUME_TYPE_NONE;
4790 m_commandRelationType = BOOTSTRAPPER_RELATION_NONE;
4791 m_hwndSplashScreen = NULL;
4792
4793 m_plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN;
4794
4795 m_sczAfterForcedRestartPackage = NULL;
4796 m_sczBundleVersion = NULL;
4797
4798 m_pWixLoc = NULL;
4799 m_Bundle = { };
4800 m_Conditions = { };
4801 m_sczConfirmCloseMessage = NULL;
4802 m_sczFailedMessage = NULL;
4803
4804 m_sczLanguage = NULL;
4805 m_pTheme = NULL;
4806 memset(m_rgdwPageIds, 0, sizeof(m_rgdwPageIds));
4807 m_hUiThread = NULL;
4808 m_fRegistered = FALSE;
4809 m_hWnd = NULL;
4810
4811 m_state = WIXSTDBA_STATE_INITIALIZING;
4812 m_hrFinal = S_OK;
4813
4814 m_restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE;
4815 m_fRestartRequired = FALSE;
4816 m_fShouldRestart = FALSE;
4817 m_fAllowRestart = FALSE;
4818 m_fRestartRequiresElevation = FALSE;
4819 m_fElevatingForRestart = FALSE;
4820
4821 m_sczLicenseFile = NULL;
4822 m_sczLicenseUrl = NULL;
4823 m_fSuppressDowngradeFailure = FALSE;
4824 m_fDowngrading = FALSE;
4825 m_fSuppressRepair = FALSE;
4826 m_fSupportCacheOnly = FALSE;
4827 m_fRequestedCacheOnly = FALSE;
4828
4829 m_pTaskbarList = NULL;
4830 m_uTaskbarButtonCreatedMessage = UINT_MAX;
4831 m_fTaskbarButtonOK = FALSE;
4832 ::InitializeCriticalSection(&m_csShowingInternalUiThisPackage);
4833 m_fShowingInternalUiThisPackage = FALSE;
4834 m_fTriedToLaunchElevated = FALSE;
4835
4836 m_fPrereq = fRunAsPrereqBA;
4837 m_fHandleHelp = FALSE;
4838 m_fPreplanPrereqs = FALSE;
4839 m_fPrereqPackagePlanned = FALSE;
4840 m_fPrereqInstalled = FALSE;
4841 m_fPrereqSkipped = FALSE;
4842
4843 m_fShowStandardFilesInUse = FALSE;
4844 m_fShowRMFilesInUse = FALSE;
4845 m_fShowNetfxFilesInUse = FALSE;
4846 m_nLastMsiFilesInUseResult = IDNOACTION;
4847 m_nLastNetfxFilesInUseResult = IDNOACTION;
4848 m_pFilesInUseTitleLoc = NULL;
4849 m_pFilesInUseLabelLoc = NULL;
4850 m_pFilesInUseCloseRadioButtonLoc = NULL;
4851 m_pFilesInUseNetfxCloseRadioButtonLoc = NULL;
4852 m_pFilesInUseDontCloseRadioButtonLoc = NULL;
4853 m_pFilesInUseRetryButtonLoc = NULL;
4854 m_pFilesInUseIgnoreButtonLoc = NULL;
4855 m_pFilesInUseExitButtonLoc = NULL;
4856
4857 m_hBAFModule = NULL;
4858 m_pfnBAFunctionsProc = NULL;
4859 m_pvBAFunctionsProcContext = NULL;
4860
4861 C_ASSERT(0 == WIXSTDBA_CONTROL_INSTALL_BUTTON - WIXSTDBA_FIRST_ASSIGN_CONTROL_ID);
4862 pAssignControl = m_rgInitControls;
4863
4864 pAssignControl->wId = WIXSTDBA_CONTROL_INSTALL_BUTTON;
4865 pAssignControl->wzName = L"InstallButton";
4866 pAssignControl->ppControl = &m_pControlInstallButton;
4867 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4868 m_pControlInstallButton = NULL;
4869 ++pAssignControl;
4870
4871 pAssignControl->wId = WIXSTDBA_CONTROL_EULA_RICHEDIT;
4872 pAssignControl->wzName = L"EulaRichedit";
4873 pAssignControl->ppControl = &m_pControlEulaRichedit;
4874 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4875 m_pControlEulaRichedit = NULL;
4876 ++pAssignControl;
4877
4878 pAssignControl->wId = WIXSTDBA_CONTROL_EULA_LINK;
4879 pAssignControl->wzName = L"EulaHyperlink";
4880 pAssignControl->ppControl = &m_pControlEulaHyperlink;
4881 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4882 m_pControlEulaHyperlink = NULL;
4883 ++pAssignControl;
4884
4885 pAssignControl->wId = WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX;
4886 pAssignControl->wzName = L"EulaAcceptCheckbox";
4887 pAssignControl->ppControl = &m_pControlEulaAcceptCheckbox;
4888 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4889 m_pControlEulaAcceptCheckbox = NULL;
4890 ++pAssignControl;
4891
4892 pAssignControl->wId = WIXSTDBA_CONTROL_REPAIR_BUTTON;
4893 pAssignControl->wzName = L"RepairButton";
4894 pAssignControl->ppControl = &m_pControlRepairButton;
4895 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4896 m_pControlRepairButton = NULL;
4897 ++pAssignControl;
4898
4899 pAssignControl->wId = WIXSTDBA_CONTROL_UNINSTALL_BUTTON;
4900 pAssignControl->wzName = L"UninstallButton";
4901 pAssignControl->ppControl = &m_pControlUninstallButton;
4902 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4903 m_pControlUninstallButton = NULL;
4904 ++pAssignControl;
4905
4906 pAssignControl->wId = WIXSTDBA_CONTROL_CHECKING_FOR_UPDATES_LABEL;
4907 pAssignControl->wzName = L"CheckingForUpdatesLabel";
4908 pAssignControl->ppControl = &m_pControlCheckingForUpdatesLabel;
4909 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4910 m_pControlCheckingForUpdatesLabel = NULL;
4911 ++pAssignControl;
4912
4913 pAssignControl->wId = WIXSTDBA_CONTROL_INSTALL_UPDATE_BUTTON;
4914 pAssignControl->wzName = L"InstallUpdateButton";
4915 pAssignControl->ppControl = &m_pControlInstallUpdateButton;
4916 pAssignControl->dwAutomaticBehaviorType = THEME_CONTROL_AUTOMATIC_BEHAVIOR_ALL;
4917 m_pControlInstallUpdateButton = NULL;
4918 ++pAssignControl;
4919
4920 pAssignControl->wId = WIXSTDBA_CONTROL_MODIFY_UPDATE_BUTTON;
4921 pAssignControl->wzName = L"ModifyUpdateButton";
4922 pAssignControl->ppControl = &m_pControlModifyUpdateButton;
4923 pAssignControl->dwAutomaticBehaviorType = THEME_CONTROL_AUTOMATIC_BEHAVIOR_ALL;
4924 m_pControlModifyUpdateButton = NULL;
4925 ++pAssignControl;
4926
4927 pAssignControl->wId = WIXSTDBA_CONTROL_CACHE_PROGRESS_PACKAGE_TEXT;
4928 pAssignControl->wzName = L"CacheProgressPackageText";
4929 pAssignControl->ppControl = &m_pControlCacheProgressPackageText;
4930 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4931 m_pControlCacheProgressPackageText = NULL;
4932 ++pAssignControl;
4933
4934 pAssignControl->wId = WIXSTDBA_CONTROL_CACHE_PROGRESS_BAR;
4935 pAssignControl->wzName = L"CacheProgressbar";
4936 pAssignControl->ppControl = &m_pControlCacheProgressbar;
4937 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4938 m_pControlCacheProgressbar = NULL;
4939 ++pAssignControl;
4940
4941 pAssignControl->wId = WIXSTDBA_CONTROL_CACHE_PROGRESS_TEXT;
4942 pAssignControl->wzName = L"CacheProgressText";
4943 pAssignControl->ppControl = &m_pControlCacheProgressText;
4944 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4945 m_pControlCacheProgressText = NULL;
4946 ++pAssignControl;
4947
4948 pAssignControl->wId = WIXSTDBA_CONTROL_EXECUTE_PROGRESS_PACKAGE_TEXT;
4949 pAssignControl->wzName = L"ExecuteProgressPackageText";
4950 pAssignControl->ppControl = &m_pControlExecuteProgressPackageText;
4951 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4952 m_pControlExecuteProgressPackageText = NULL;
4953 ++pAssignControl;
4954
4955 pAssignControl->wId = WIXSTDBA_CONTROL_EXECUTE_PROGRESS_BAR;
4956 pAssignControl->wzName = L"ExecuteProgressbar";
4957 pAssignControl->ppControl = &m_pControlExecuteProgressbar;
4958 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4959 m_pControlExecuteProgressbar = NULL;
4960 ++pAssignControl;
4961
4962 pAssignControl->wId = WIXSTDBA_CONTROL_EXECUTE_PROGRESS_TEXT;
4963 pAssignControl->wzName = L"ExecuteProgressText";
4964 pAssignControl->ppControl = &m_pControlExecuteProgressText;
4965 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4966 m_pControlExecuteProgressText = NULL;
4967 ++pAssignControl;
4968
4969 pAssignControl->wId = WIXSTDBA_CONTROL_EXECUTE_PROGRESS_ACTIONDATA_TEXT;
4970 pAssignControl->wzName = L"ExecuteProgressActionDataText";
4971 pAssignControl->ppControl = &m_pControlExecuteProgressActionDataText;
4972 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4973 m_pControlExecuteProgressActionDataText = NULL;
4974 ++pAssignControl;
4975
4976 pAssignControl->wId = WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT;
4977 pAssignControl->wzName = L"OverallProgressPackageText";
4978 pAssignControl->ppControl = &m_pControlOverallProgressPackageText;
4979 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4980 m_pControlOverallProgressPackageText = NULL;
4981 ++pAssignControl;
4982
4983 pAssignControl->wId = WIXSTDBA_CONTROL_OVERALL_PROGRESS_BAR;
4984 pAssignControl->wzName = L"OverallProgressbar";
4985 pAssignControl->ppControl = &m_pControlOverallProgressbar;
4986 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4987 m_pControlOverallProgressbar = NULL;
4988 ++pAssignControl;
4989
4990 pAssignControl->wId = WIXSTDBA_CONTROL_OVERALL_CALCULATED_PROGRESS_BAR;
4991 pAssignControl->wzName = L"OverallCalculatedProgressbar";
4992 pAssignControl->ppControl = &m_pControlOverallCalculatedProgressbar;
4993 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
4994 m_pControlOverallCalculatedProgressbar = NULL;
4995 ++pAssignControl;
4996
4997 pAssignControl->wId = WIXSTDBA_CONTROL_OVERALL_PROGRESS_TEXT;
4998 pAssignControl->wzName = L"OverallProgressText";
4999 pAssignControl->ppControl = &m_pControlOverallProgressText;
5000 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
5001 m_pControlOverallProgressText = NULL;
5002 ++pAssignControl;
5003
5004 pAssignControl->wId = WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON;
5005 pAssignControl->wzName = L"ProgressCancelButton";
5006 pAssignControl->ppControl = &m_pControlProgressCancelButton;
5007 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
5008 m_pControlProgressCancelButton = NULL;
5009 ++pAssignControl;
5010
5011 pAssignControl->wId = WIXSTDBA_CONTROL_LAUNCH_BUTTON;
5012 pAssignControl->wzName = L"LaunchButton";
5013 pAssignControl->ppControl = &m_pControlLaunchButton;
5014 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
5015 m_pControlLaunchButton = NULL;
5016 ++pAssignControl;
5017
5018 pAssignControl->wId = WIXSTDBA_CONTROL_SUCCESS_RESTART_BUTTON;
5019 pAssignControl->wzName = L"SuccessRestartButton";
5020 pAssignControl->ppControl = &m_pControlSuccessRestartButton;
5021 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
5022 m_pControlSuccessRestartButton = NULL;
5023 ++pAssignControl;
5024
5025 pAssignControl->wId = WIXSTDBA_CONTROL_FAILURE_LOGFILE_LINK;
5026 pAssignControl->wzName = L"FailureLogFileLink";
5027 pAssignControl->ppControl = &m_pControlFailureLogFileLink;
5028 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
5029 m_pControlFailureLogFileLink = NULL;
5030 ++pAssignControl;
5031
5032 pAssignControl->wId = WIXSTDBA_CONTROL_FAILURE_MESSAGE_TEXT;
5033 pAssignControl->wzName = L"FailureMessageText";
5034 pAssignControl->ppControl = &m_pControlFailureMessageText;
5035 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
5036 m_pControlFailureMessageText = NULL;
5037 ++pAssignControl;
5038
5039 pAssignControl->wId = WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON;
5040 pAssignControl->wzName = L"FailureRestartButton";
5041 pAssignControl->ppControl = &m_pControlFailureRestartButton;
5042 pAssignControl->dwAutomaticBehaviorType = dwAutomaticBehaviorType;
5043 m_pControlFailureRestartButton = NULL;
5044
5045 C_ASSERT(LAST_WIXSTDBA_CONTROL == WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON + 1);
5046 }
5047
5048
5049 //
5050 // Destructor - release member variables.
5051 //
5052 ~CWixStandardBootstrapperApplication()
5053 {
5054 AssertSz(!::IsWindow(m_hWnd), "Window should have been destroyed before destructor.");
5055 AssertSz(!m_pTaskbarList, "Taskbar should have been released before destructor.");
5056 AssertSz(!m_pTheme, "Theme should have been released before destructor.");
5057
5058 ::DeleteCriticalSection(&m_csShowingInternalUiThisPackage);
5059 ReleaseStr(m_sczFailedMessage);
5060 ReleaseStr(m_sczConfirmCloseMessage);
5061 BalConditionsUninitialize(&m_Conditions);
5062 BalInfoUninitialize(&m_Bundle);
5063 LocFree(m_pWixLoc);
5064
5065 ReleaseStr(m_sczLanguage);
5066 ReleaseStr(m_sczLicenseFile);
5067 ReleaseStr(m_sczLicenseUrl);
5068 ReleaseStr(m_sczBundleVersion);
5069 ReleaseStr(m_sczAfterForcedRestartPackage);
5070 }
5071
5072private:
5073 HMODULE m_hModule;
5074 BOOTSTRAPPER_ACTION m_commandAction;
5075 BOOTSTRAPPER_DISPLAY m_commandDisplay;
5076 BOOTSTRAPPER_RESUME_TYPE m_commandResumeType;
5077 BOOTSTRAPPER_RELATION_TYPE m_commandRelationType;
5078 HWND m_hwndSplashScreen;
5079
5080 BOOTSTRAPPER_ACTION m_plannedAction;
5081
5082 LPWSTR m_sczAfterForcedRestartPackage;
5083 LPWSTR m_sczBundleVersion;
5084
5085 WIX_LOCALIZATION* m_pWixLoc;
5086 BAL_INFO_BUNDLE m_Bundle;
5087 BAL_CONDITIONS m_Conditions;
5088 LPWSTR m_sczFailedMessage;
5089 LPWSTR m_sczConfirmCloseMessage;
5090
5091 LPWSTR m_sczLanguage;
5092 THEME* m_pTheme;
5093 THEME_ASSIGN_CONTROL_ID m_rgInitControls[LAST_WIXSTDBA_CONTROL - WIXSTDBA_FIRST_ASSIGN_CONTROL_ID];
5094 DWORD m_rgdwPageIds[countof(vrgwzPageNames)];
5095 HANDLE m_hUiThread;
5096 BOOL m_fRegistered;
5097 HWND m_hWnd;
5098
5099 // Welcome page
5100 const THEME_CONTROL* m_pControlInstallButton;
5101 const THEME_CONTROL* m_pControlEulaRichedit;
5102 const THEME_CONTROL* m_pControlEulaHyperlink;
5103 const THEME_CONTROL* m_pControlEulaAcceptCheckbox;
5104
5105 // Modify page
5106 const THEME_CONTROL* m_pControlRepairButton;
5107 const THEME_CONTROL* m_pControlUninstallButton;
5108
5109 // Update/loading pages
5110 const THEME_CONTROL* m_pControlCheckingForUpdatesLabel;
5111 const THEME_CONTROL* m_pControlInstallUpdateButton;
5112 const THEME_CONTROL* m_pControlModifyUpdateButton;
5113
5114 // Progress page
5115 const THEME_CONTROL* m_pControlCacheProgressPackageText;
5116 const THEME_CONTROL* m_pControlCacheProgressbar;
5117 const THEME_CONTROL* m_pControlCacheProgressText;
5118
5119 const THEME_CONTROL* m_pControlExecuteProgressPackageText;
5120 const THEME_CONTROL* m_pControlExecuteProgressbar;
5121 const THEME_CONTROL* m_pControlExecuteProgressText;
5122 const THEME_CONTROL* m_pControlExecuteProgressActionDataText;
5123
5124 const THEME_CONTROL* m_pControlOverallProgressPackageText;
5125 const THEME_CONTROL* m_pControlOverallProgressbar;
5126 const THEME_CONTROL* m_pControlOverallCalculatedProgressbar;
5127 const THEME_CONTROL* m_pControlOverallProgressText;
5128
5129 const THEME_CONTROL* m_pControlProgressCancelButton;
5130
5131 // Success page
5132 const THEME_CONTROL* m_pControlLaunchButton;
5133 const THEME_CONTROL* m_pControlSuccessRestartButton;
5134
5135 // Failure page
5136 const THEME_CONTROL* m_pControlFailureLogFileLink;
5137 const THEME_CONTROL* m_pControlFailureMessageText;
5138 const THEME_CONTROL* m_pControlFailureRestartButton;
5139
5140 WIXSTDBA_STATE m_state;
5141 HRESULT m_hrFinal;
5142
5143 BOOL m_fStartedExecution;
5144 DWORD m_dwCalculatedCacheProgress;
5145 DWORD m_dwCalculatedExecuteProgress;
5146
5147 BOOTSTRAPPER_APPLY_RESTART m_restartResult;
5148 BOOL m_fRestartRequired;
5149 BOOL m_fShouldRestart;
5150 BOOL m_fAllowRestart;
5151 BOOL m_fRestartRequiresElevation;
5152 BOOL m_fElevatingForRestart;
5153
5154 LPWSTR m_sczLicenseFile;
5155 LPWSTR m_sczLicenseUrl;
5156 BOOL m_fSuppressDowngradeFailure;
5157 BOOL m_fDowngrading;
5158 BOOL m_fSuppressRepair;
5159 BOOL m_fSupportCacheOnly;
5160 BOOL m_fRequestedCacheOnly;
5161
5162 BOOL m_fPrereq;
5163 BOOL m_fPreplanPrereqs;
5164 BOOL m_fHandleHelp;
5165 BOOL m_fPrereqPackagePlanned;
5166 BOOL m_fPrereqInstalled;
5167 BOOL m_fPrereqSkipped;
5168
5169 ITaskbarList3* m_pTaskbarList;
5170 UINT m_uTaskbarButtonCreatedMessage;
5171 BOOL m_fTaskbarButtonOK;
5172 CRITICAL_SECTION m_csShowingInternalUiThisPackage;
5173 BOOL m_fShowingInternalUiThisPackage;
5174 BOOL m_fTriedToLaunchElevated;
5175
5176 BOOL m_fShowStandardFilesInUse;
5177 BOOL m_fShowRMFilesInUse;
5178 BOOL m_fShowNetfxFilesInUse;
5179 int m_nLastMsiFilesInUseResult;
5180 int m_nLastNetfxFilesInUseResult;
5181 LOC_STRING* m_pFilesInUseTitleLoc;
5182 LOC_STRING* m_pFilesInUseLabelLoc;
5183 LOC_STRING* m_pFilesInUseCloseRadioButtonLoc;
5184 LOC_STRING* m_pFilesInUseNetfxCloseRadioButtonLoc;
5185 LOC_STRING* m_pFilesInUseDontCloseRadioButtonLoc;
5186 LOC_STRING* m_pFilesInUseRetryButtonLoc;
5187 LOC_STRING* m_pFilesInUseIgnoreButtonLoc;
5188 LOC_STRING* m_pFilesInUseExitButtonLoc;
5189
5190 HMODULE m_hBAFModule;
5191 PFN_BA_FUNCTIONS_PROC m_pfnBAFunctionsProc;
5192 LPVOID m_pvBAFunctionsProcContext;
5193};
5194
5195
5196static HRESULT DAPI EvaluateVariableConditionCallback(
5197 __in_z LPCWSTR wzCondition,
5198 __out BOOL* pf,
5199 __in_opt LPVOID /*pvContext*/
5200 )
5201{
5202 return BalEvaluateCondition(wzCondition, pf);
5203}
5204
5205
5206static HRESULT DAPI FormatVariableStringCallback(
5207 __in_z LPCWSTR wzFormat,
5208 __inout LPWSTR* psczOut,
5209 __in_opt LPVOID /*pvContext*/
5210 )
5211{
5212 return BalFormatString(wzFormat, psczOut);
5213}
5214
5215
5216static HRESULT DAPI GetVariableNumericCallback(
5217 __in_z LPCWSTR wzVariable,
5218 __out LONGLONG* pllValue,
5219 __in_opt LPVOID /*pvContext*/
5220 )
5221{
5222 return BalGetNumericVariable(wzVariable, pllValue);
5223}
5224
5225
5226static HRESULT DAPI SetVariableNumericCallback(
5227 __in_z LPCWSTR wzVariable,
5228 __in LONGLONG llValue,
5229 __in_opt LPVOID /*pvContext*/
5230 )
5231{
5232 return BalSetNumericVariable(wzVariable, llValue);
5233}
5234
5235
5236static HRESULT DAPI GetVariableStringCallback(
5237 __in_z LPCWSTR wzVariable,
5238 __inout LPWSTR* psczValue,
5239 __in_opt LPVOID /*pvContext*/
5240 )
5241{
5242 return BalGetStringVariable(wzVariable, psczValue);
5243}
5244
5245
5246static HRESULT DAPI SetVariableStringCallback(
5247 __in_z LPCWSTR wzVariable,
5248 __in_z_opt LPCWSTR wzValue,
5249 __in BOOL fFormatted,
5250 __in_opt LPVOID /*pvContext*/
5251 )
5252{
5253 return BalSetStringVariable(wzVariable, wzValue, fFormatted);
5254}
5255
5256static LPCSTR LoggingBoolToString(
5257 __in BOOL f
5258 )
5259{
5260 if (f)
5261 {
5262 return "Yes";
5263 }
5264
5265 return "No";
5266}
5267
5268static LPCSTR LoggingRequestStateToString(
5269 __in BOOTSTRAPPER_REQUEST_STATE requestState
5270 )
5271{
5272 switch (requestState)
5273 {
5274 case BOOTSTRAPPER_REQUEST_STATE_NONE:
5275 return "None";
5276 case BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT:
5277 return "ForceAbsent";
5278 case BOOTSTRAPPER_REQUEST_STATE_ABSENT:
5279 return "Absent";
5280 case BOOTSTRAPPER_REQUEST_STATE_CACHE:
5281 return "Cache";
5282 case BOOTSTRAPPER_REQUEST_STATE_PRESENT:
5283 return "Present";
5284 case BOOTSTRAPPER_REQUEST_STATE_REPAIR:
5285 return "Repair";
5286 default:
5287 return "Invalid";
5288 }
5289}
5290
5291static LPCSTR LoggingPlanRelationTypeToString(
5292 __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE type
5293 )
5294{
5295 switch (type)
5296 {
5297 case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_NONE:
5298 return "None";
5299 case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DOWNGRADE:
5300 return "Downgrade";
5301 case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_UPGRADE:
5302 return "Upgrade";
5303 case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_ADDON:
5304 return "Addon";
5305 case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_PATCH:
5306 return "Patch";
5307 case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DEPENDENT_ADDON:
5308 return "DependentAddon";
5309 case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DEPENDENT_PATCH:
5310 return "DependentPatch";
5311 default:
5312 return "Invalid";
5313 }
5314}
5315
5316static LPCSTR LoggingMsiFeatureStateToString(
5317 __in BOOTSTRAPPER_FEATURE_STATE featureState
5318 )
5319{
5320 switch (featureState)
5321 {
5322 case BOOTSTRAPPER_FEATURE_STATE_UNKNOWN:
5323 return "Unknown";
5324 case BOOTSTRAPPER_FEATURE_STATE_ABSENT:
5325 return "Absent";
5326 case BOOTSTRAPPER_FEATURE_STATE_ADVERTISED:
5327 return "Advertised";
5328 case BOOTSTRAPPER_FEATURE_STATE_LOCAL:
5329 return "Local";
5330 case BOOTSTRAPPER_FEATURE_STATE_SOURCE:
5331 return "Source";
5332 default:
5333 return "Invalid";
5334 }
5335}
5336
5337EXTERN_C HRESULT CreateWixPrerequisiteBootstrapperApplication(
5338 __in HINSTANCE hInstance,
5339 __out IBootstrapperApplication** ppApplication
5340 )
5341{
5342 HRESULT hr = S_OK;
5343
5344 CWixStandardBootstrapperApplication* pApplication = new CWixStandardBootstrapperApplication(hInstance, TRUE);
5345 ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new bootstrapper application.");
5346
5347 hr = pApplication->QueryInterface(IID_PPV_ARGS(ppApplication));
5348 ExitOnRootFailure(hr, "Failed to query for IBootstrapperApplication.");
5349
5350LExit:
5351 ReleaseObject(pApplication);
5352
5353 return hr;
5354}
5355
5356EXTERN_C HRESULT CreateWixStandardBootstrapperApplication(
5357 __in HINSTANCE hInstance,
5358 __out IBootstrapperApplication** ppApplication
5359 )
5360{
5361 HRESULT hr = S_OK;
5362
5363 CWixStandardBootstrapperApplication* pApplication = new CWixStandardBootstrapperApplication(hInstance, FALSE);
5364 ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new bootstrapper application.");
5365
5366 hr = pApplication->QueryInterface(IID_PPV_ARGS(ppApplication));
5367 ExitOnRootFailure(hr, "Failed to query for IBootstrapperApplication.");
5368
5369LExit:
5370 ReleaseObject(pApplication);
5371
5372 return hr;
5373}
diff --git a/src/ext/Bal/stdbas/inc/WixInternalUIBootstrapperApplication.h b/src/ext/Bal/stdbas/inc/WixInternalUIBootstrapperApplication.h
new file mode 100644
index 00000000..6dfef7d9
--- /dev/null
+++ b/src/ext/Bal/stdbas/inc/WixInternalUIBootstrapperApplication.h
@@ -0,0 +1,7 @@
1#pragma once
2// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
4EXTERN_C HRESULT CreateWixInternalUIBootstrapperApplication(
5 __in HINSTANCE hInstance,
6 __out IBootstrapperApplication** ppApplication
7 );
diff --git a/src/ext/Bal/stdbas/inc/WixStandardBootstrapperApplication.h b/src/ext/Bal/stdbas/inc/WixStandardBootstrapperApplication.h
new file mode 100644
index 00000000..c3742816
--- /dev/null
+++ b/src/ext/Bal/stdbas/inc/WixStandardBootstrapperApplication.h
@@ -0,0 +1,12 @@
1#pragma once
2// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
4EXTERN_C HRESULT CreateWixPrerequisiteBootstrapperApplication(
5 __in HINSTANCE hInstance,
6 __out IBootstrapperApplication** ppApplication
7 );
8
9EXTERN_C HRESULT CreateWixStandardBootstrapperApplication(
10 __in HINSTANCE hInstance,
11 __out IBootstrapperApplication** ppApplication
12 );
diff --git a/src/ext/Bal/stdbas/precomp.cpp b/src/ext/Bal/stdbas/precomp.cpp
new file mode 100644
index 00000000..37664a1c
--- /dev/null
+++ b/src/ext/Bal/stdbas/precomp.cpp
@@ -0,0 +1,3 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3#include "precomp.h"
diff --git a/src/ext/Bal/stdbas/precomp.h b/src/ext/Bal/stdbas/precomp.h
new file mode 100644
index 00000000..7f138035
--- /dev/null
+++ b/src/ext/Bal/stdbas/precomp.h
@@ -0,0 +1,49 @@
1#pragma once
2// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
4
5#include <windows.h>
6
7#pragma warning(push)
8#pragma warning(disable:4458) // declaration of 'xxx' hides class member
9#include <gdiplus.h>
10#pragma warning(pop)
11
12#include <msiquery.h>
13#include <objbase.h>
14#include <shlobj.h>
15#include <shlwapi.h>
16#include <stdlib.h>
17#include <strsafe.h>
18#include <stddef.h>
19
20#include <dutil.h>
21#include <apputil.h>
22#include <memutil.h>
23#include <dictutil.h>
24#include <dirutil.h>
25#include <fileutil.h>
26#include <locutil.h>
27#include <logutil.h>
28#include <pathutil.h>
29#include <procutil.h>
30#include <resrutil.h>
31#include <shelutil.h>
32#include <strutil.h>
33#include <wndutil.h>
34#include <thmutil.h>
35#include <verutil.h>
36#include <uriutil.h>
37#include <xmlutil.h>
38
39#include <IBootstrapperEngine.h>
40#include <IBootstrapperApplication.h>
41
42#include <balutil.h>
43#include <balinfo.h>
44#include <balcondition.h>
45
46#include <BAFunctions.h>
47
48#include "stdbas.messages.h"
49#include "WixStandardBootstrapperApplication.h"
diff --git a/src/ext/Bal/stdbas/stdbas.manifest b/src/ext/Bal/stdbas/stdbas.manifest
new file mode 100644
index 00000000..d978bb2b
--- /dev/null
+++ b/src/ext/Bal/stdbas/stdbas.manifest
@@ -0,0 +1,19 @@
1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3 <assemblyIdentity name="wixstdba.exe" version="5.0.0.0" type="win32"/>
4 <description>WiX Toolset Bootstrapper Applications</description>
5 <dependency><dependentAssembly><assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /></dependentAssembly></dependency>
6 <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"><application>
7 <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
8 <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
9 <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
10 <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
11 <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
12 </application></compatibility>
13 <application xmlns="urn:schemas-microsoft-com:asm.v3"><windowsSettings>
14 <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
15 <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor, System</dpiAwareness>
16 <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
17 </windowsSettings></application>
18 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"><security><requestedPrivileges><requestedExecutionLevel level="asInvoker" uiAccess="false"/></requestedPrivileges></security></trustInfo>
19</assembly>
diff --git a/src/ext/Bal/stdbas/stdbas.mc b/src/ext/Bal/stdbas/stdbas.mc
new file mode 100644
index 00000000..025315a5
--- /dev/null
+++ b/src/ext/Bal/stdbas/stdbas.mc
@@ -0,0 +1,101 @@
1; // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3
4MessageIdTypedef=DWORD
5
6LanguageNames=(English=0x409:MSG00409)
7
8
9; // message definitions
10
11; // MessageId=#
12; // Severity=Success
13; // SymbolicName=MSG_SUCCESS
14; // Language=English
15; // Success %1.
16; // .
17;
18; // MessageId=#
19; // Severity=Warning
20; // SymbolicName=MSG_WARNING
21; // Language=English
22; // Warning %1.
23; // .
24;
25; // MessageId=#
26; // Severity=Error
27; // SymbolicName=MSG_ERROR
28; // Language=English
29; // Error %1.
30; // .
31
32MessageId=1
33Severity=Success
34SymbolicName=MSG_WIXSTDBA_PLANNED_FORWARD_COMPATIBLE_BUNDLE
35Language=English
36WIXSTDBA: Planned forward compatible bundle: %1!ls!, wixstdba requested: %2!hs!, bafunctions requested: %3!hs!
37.
38
39MessageId=2
40Severity=Success
41SymbolicName=MSG_WIXSTDBA_PLANNED_PACKAGE
42Language=English
43WIXSTDBA: Planned package: %1!ls!, wixstdba requested: %2!hs!, bafunctions requested: %3!hs!
44.
45
46MessageId=3
47Severity=Success
48SymbolicName=MSG_WIXSTDBA_PLANNED_RELATED_BUNDLE
49Language=English
50WIXSTDBA: Planned related bundle: %1!ls!, wixstdba requested: %2!hs!, bafunctions requested: %3!hs!
51.
52
53MessageId=4
54Severity=Success
55SymbolicName=MSG_WIXSTDBA_PLANNED_COMPATIBLE_MSI_PACKAGE
56Language=English
57WIXSTDBA: Planned compatible package: %2!ls! for %1!ls!, wixstdba requested remove: %3!hs!, bafunctions requested remove: %4!hs!
58.
59
60MessageId=5
61Severity=Success
62SymbolicName=MSG_WIXSTDBA_PLANNED_TARGET_MSI_PACKAGE
63Language=English
64WIXSTDBA: Planned target MSI package: %1!ls!, productCode: %2!ls!, wixstdba requested: %3!hs!, bafunctions requested: %4!hs!
65.
66
67MessageId=6
68Severity=Success
69SymbolicName=MSG_WIXSTDBA_PLANNED_MSI_FEATURE
70Language=English
71WIXSTDBA: Planned MSI feature: %2!ls! for %1!ls!, wixstdba requested: %3!hs!, bafunctions requested: %4!hs!
72.
73
74MessageId=7
75Severity=Success
76SymbolicName=MSG_WIXSTDBA_PLANNED_MSI_PACKAGE
77Language=English
78WIXSTDBA: Planned MSI package: %1!ls!, wixstdba requested: actionMsiProperty=%2!d!;uiLevel=%3!d!;disableExternalUiHandler=%4!hs!, bafunctions requested: actionMsiProperty=%5!d!;uiLevel=%6!d!;disableExternalUiHandler=%7!hs!
79.
80
81MessageId=8
82Severity=Success
83SymbolicName=MSG_WIXSTDBA_PLANNED_ROLLBACK_BOUNDARY
84Language=English
85WIXSTDBA: Planned rollback boundary: %1!ls!, wixstdba requested transaction: %2!hs!, bafunctions requested transaction: %3!hs!
86.
87
88MessageId=9
89Severity=Success
90SymbolicName=MSG_WIXSTDBA_PLANNED_RESTORE_RELATED_BUNDLE
91Language=English
92WIXSTDBA: Planned restore related bundle: %1!ls!, wixstdba requested: %2!hs!, bafunctions requested: %3!hs!
93.
94
95MessageId=10
96Severity=Success
97SymbolicName=MSG_WIXSTDBA_PLANNED_RELATED_BUNDLE_TYPE
98Language=English
99WIXSTDBA: Planned related bundle type: %1!ls!, wixstdba requested: %2!hs!, bafunctions requested: %3!hs!
100.
101
diff --git a/src/ext/Bal/stdbas/stdbas.vcxproj b/src/ext/Bal/stdbas/stdbas.vcxproj
new file mode 100644
index 00000000..3722b40a
--- /dev/null
+++ b/src/ext/Bal/stdbas/stdbas.vcxproj
@@ -0,0 +1,79 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 <ItemGroup Label="ProjectConfigurations">
6 <ProjectConfiguration Include="Debug|ARM64">
7 <Configuration>Debug</Configuration>
8 <Platform>ARM64</Platform>
9 </ProjectConfiguration>
10 <ProjectConfiguration Include="Release|ARM64">
11 <Configuration>Release</Configuration>
12 <Platform>ARM64</Platform>
13 </ProjectConfiguration>
14 <ProjectConfiguration Include="Debug|Win32">
15 <Configuration>Debug</Configuration>
16 <Platform>Win32</Platform>
17 </ProjectConfiguration>
18 <ProjectConfiguration Include="Release|Win32">
19 <Configuration>Release</Configuration>
20 <Platform>Win32</Platform>
21 </ProjectConfiguration>
22 <ProjectConfiguration Include="Debug|x64">
23 <Configuration>Debug</Configuration>
24 <Platform>x64</Platform>
25 </ProjectConfiguration>
26 <ProjectConfiguration Include="Release|x64">
27 <Configuration>Release</Configuration>
28 <Platform>x64</Platform>
29 </ProjectConfiguration>
30 </ItemGroup>
31
32 <PropertyGroup Label="Globals">
33 <ProjectGuid>{DBBF5F32-BAEA-46A8-99A0-17277A906456}</ProjectGuid>
34 <Keyword>Win32Proj</Keyword>
35 <ConfigurationType>StaticLibrary</ConfigurationType>
36 <CharacterSet>Unicode</CharacterSet>
37 <Description>WiX Standard Bootstrapper Applications</Description>
38 <CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets>
39 </PropertyGroup>
40
41 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
42 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
43
44 <ImportGroup Label="ExtensionSettings">
45 </ImportGroup>
46
47 <ImportGroup Label="Shared">
48 </ImportGroup>
49
50 <ItemGroup>
51 <ClInclude Include="inc\WixInternalUIBootstrapperApplication.h" />
52 <ClInclude Include="inc\WixStandardBootstrapperApplication.h" />
53 <ClInclude Include="precomp.h" />
54 </ItemGroup>
55 <ItemGroup>
56 <ClCompile Include="precomp.cpp">
57 <PrecompiledHeader>Create</PrecompiledHeader>
58 </ClCompile>
59 <ClCompile Include="WixInternalUIBootstrapperApplication.cpp" />
60 <ClCompile Include="WixStandardBootstrapperApplication.cpp" />
61 </ItemGroup>
62
63 <ItemDefinitionGroup>
64 <CustomBuildStep>
65 <Message>Compiling message file...</Message>
66 <Command>mc.exe -h "$(IntDir)." -r "$(IntDir)." -A -c -z stdbas.messages "$(InputDir)stdbas.mc"
67rc.exe -fo "$(OutDir)stdbas.res" "$(IntDir)stdbas.messages.rc"</Command>
68 <Inputs>$(InputDir)stdbas.mc</Inputs>
69 <Outputs>$(IntDir)stdbas.messages.h;$(IntDir)stdbas.messages.rc</Outputs>
70 </CustomBuildStep>
71 </ItemDefinitionGroup>
72
73 <ItemGroup>
74 <PackageReference Include="WixToolset.BalUtil" />
75 <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
76 </ItemGroup>
77
78 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
79</Project>