diff options
| author | Bob Arnson <bob@firegiant.com> | 2026-07-05 23:01:31 -0400 |
|---|---|---|
| committer | Bob Arnson <github@bobs.org> | 2026-07-22 11:45:41 -0400 |
| commit | e53ec9f0ba68ba029245f823b415209287941926 (patch) | |
| tree | 7bcb44a7637bde16f538d170070c6b450ddf81a8 /src | |
| parent | c5b1c40cd44145a24cb82349d988e7abdd0b94d5 (diff) | |
| download | wix-e53ec9f0ba68ba029245f823b415209287941926.tar.gz wix-e53ec9f0ba68ba029245f823b415209287941926.tar.bz2 wix-e53ec9f0ba68ba029245f823b415209287941926.zip | |
UAC shield for per-machine configurable bundles.
Fixes https://github.com/wixtoolset/issues/issues/9308
Diffstat (limited to 'src')
| -rw-r--r-- | src/ext/Bal/stdbas/Resources/HyperlinkLargeTheme.xml | 6 | ||||
| -rw-r--r-- | src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml | 6 | ||||
| -rw-r--r-- | src/ext/Bal/stdbas/Resources/HyperlinkTheme.xml | 6 | ||||
| -rw-r--r-- | src/ext/Bal/stdbas/Resources/RtfLargeTheme.xml | 8 | ||||
| -rw-r--r-- | src/ext/Bal/stdbas/Resources/RtfTheme.xml | 6 | ||||
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/inc/thmutil.h | 3 | ||||
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/thmutil.cpp | 15 | ||||
| -rw-r--r-- | src/xsd/thmutil/Button.xsd | 7 | ||||
| -rw-r--r-- | src/xsd/thmutil/CommandLink.xsd | 7 |
9 files changed, 46 insertions, 18 deletions
diff --git a/src/ext/Bal/stdbas/Resources/HyperlinkLargeTheme.xml b/src/ext/Bal/stdbas/Resources/HyperlinkLargeTheme.xml index dcc1a7c1..ddf83ad7 100644 --- a/src/ext/Bal/stdbas/Resources/HyperlinkLargeTheme.xml +++ b/src/ext/Bal/stdbas/Resources/HyperlinkLargeTheme.xml | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | <Text>#(loc.InstallOptionsButton)</Text> | 37 | <Text>#(loc.InstallOptionsButton)</Text> |
| 38 | <ChangePageAction Page="Options" /> | 38 | <ChangePageAction Page="Options" /> |
| 39 | </Button> | 39 | </Button> |
| 40 | <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button> | 40 | <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.InstallInstallButton)</Button> |
| 41 | <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | 41 | <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> |
| 42 | <Text>#(loc.InstallCancelButton)</Text> | 42 | <Text>#(loc.InstallCancelButton)</Text> |
| 43 | <CloseWindowAction /> | 43 | <CloseWindowAction /> |
| @@ -74,8 +74,8 @@ | |||
| 74 | <Page Name="Modify"> | 74 | <Page Name="Modify"> |
| 75 | <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label> | 75 | <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label> |
| 76 | <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button> | 76 | <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button> |
| 77 | <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button> | 77 | <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.ModifyRepairButton)</Button> |
| 78 | <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button> | 78 | <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.ModifyUninstallButton)</Button> |
| 79 | <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | 79 | <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> |
| 80 | <Text>#(loc.ModifyCancelButton)</Text> | 80 | <Text>#(loc.ModifyCancelButton)</Text> |
| 81 | <CloseWindowAction /> | 81 | <CloseWindowAction /> |
diff --git a/src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml b/src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml index 11eac2de..583f1037 100644 --- a/src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml +++ b/src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | <Text>#(loc.InstallOptionsButton)</Text> | 38 | <Text>#(loc.InstallOptionsButton)</Text> |
| 39 | <ChangePageAction Page="Options" /> | 39 | <ChangePageAction Page="Options" /> |
| 40 | </Button> | 40 | </Button> |
| 41 | <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button> | 41 | <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.InstallInstallButton)</Button> |
| 42 | <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | 42 | <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> |
| 43 | <Text>#(loc.InstallCancelButton)</Text> | 43 | <Text>#(loc.InstallCancelButton)</Text> |
| 44 | <CloseWindowAction /> | 44 | <CloseWindowAction /> |
| @@ -81,8 +81,8 @@ | |||
| 81 | <ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/> | 81 | <ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/> |
| 82 | <Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label> | 82 | <Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label> |
| 83 | <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button> | 83 | <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button> |
| 84 | <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button> | 84 | <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.ModifyRepairButton)</Button> |
| 85 | <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button> | 85 | <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.ModifyUninstallButton)</Button> |
| 86 | <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | 86 | <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> |
| 87 | <Text>#(loc.ModifyCancelButton)</Text> | 87 | <Text>#(loc.ModifyCancelButton)</Text> |
| 88 | <CloseWindowAction /> | 88 | <CloseWindowAction /> |
diff --git a/src/ext/Bal/stdbas/Resources/HyperlinkTheme.xml b/src/ext/Bal/stdbas/Resources/HyperlinkTheme.xml index 2d33344e..f7a77629 100644 --- a/src/ext/Bal/stdbas/Resources/HyperlinkTheme.xml +++ b/src/ext/Bal/stdbas/Resources/HyperlinkTheme.xml | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | <Text>#(loc.InstallOptionsButton)</Text> | 31 | <Text>#(loc.InstallOptionsButton)</Text> |
| 32 | <ChangePageAction Page="Options" /> | 32 | <ChangePageAction Page="Options" /> |
| 33 | </Button> | 33 | </Button> |
| 34 | <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button> | 34 | <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.InstallInstallButton)</Button> |
| 35 | <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | 35 | <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> |
| 36 | <Text>#(loc.InstallCancelButton)</Text> | 36 | <Text>#(loc.InstallCancelButton)</Text> |
| 37 | <CloseWindowAction /> | 37 | <CloseWindowAction /> |
| @@ -68,8 +68,8 @@ | |||
| 68 | <Page Name="Modify"> | 68 | <Page Name="Modify"> |
| 69 | <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label> | 69 | <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label> |
| 70 | <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button> | 70 | <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button> |
| 71 | <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button> | 71 | <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.ModifyRepairButton)</Button> |
| 72 | <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button> | 72 | <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.ModifyUninstallButton)</Button> |
| 73 | <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | 73 | <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> |
| 74 | <Text>#(loc.ModifyCancelButton)</Text> | 74 | <Text>#(loc.ModifyCancelButton)</Text> |
| 75 | <CloseWindowAction /> | 75 | <CloseWindowAction /> |
diff --git a/src/ext/Bal/stdbas/Resources/RtfLargeTheme.xml b/src/ext/Bal/stdbas/Resources/RtfLargeTheme.xml index a41e4457..104ee1c8 100644 --- a/src/ext/Bal/stdbas/Resources/RtfLargeTheme.xml +++ b/src/ext/Bal/stdbas/Resources/RtfLargeTheme.xml | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | <Text>#(loc.InstallOptionsButton)</Text> | 33 | <Text>#(loc.InstallOptionsButton)</Text> |
| 34 | <ChangePageAction Page="Options" /> | 34 | <ChangePageAction Page="Options" /> |
| 35 | </Button> | 35 | </Button> |
| 36 | <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button> | 36 | <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.InstallInstallButton)</Button> |
| 37 | <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | 37 | <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> |
| 38 | <Text>#(loc.InstallCancelButton)</Text> | 38 | <Text>#(loc.InstallCancelButton)</Text> |
| 39 | <CloseWindowAction /> | 39 | <CloseWindowAction /> |
| @@ -70,8 +70,8 @@ | |||
| 70 | <Page Name="Modify"> | 70 | <Page Name="Modify"> |
| 71 | <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label> | 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> | 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> | 73 | <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.ModifyRepairButton)</Button> |
| 74 | <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button> | 74 | <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.ModifyUninstallButton)</Button> |
| 75 | <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | 75 | <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> |
| 76 | <Text>#(loc.ModifyCancelButton)</Text> | 76 | <Text>#(loc.ModifyCancelButton)</Text> |
| 77 | <CloseWindowAction /> | 77 | <CloseWindowAction /> |
| @@ -118,6 +118,6 @@ | |||
| 118 | <Text>#(loc.FailureCloseButton)</Text> | 118 | <Text>#(loc.FailureCloseButton)</Text> |
| 119 | <CloseWindowAction /> | 119 | <CloseWindowAction /> |
| 120 | </Button> | 120 | </Button> |
| 121 | </Page> | 121 | </Page> |
| 122 | </Window> | 122 | </Window> |
| 123 | </Theme> | 123 | </Theme> |
diff --git a/src/ext/Bal/stdbas/Resources/RtfTheme.xml b/src/ext/Bal/stdbas/Resources/RtfTheme.xml index 1f1c3810..8a8d7ee9 100644 --- a/src/ext/Bal/stdbas/Resources/RtfTheme.xml +++ b/src/ext/Bal/stdbas/Resources/RtfTheme.xml | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | <Text>#(loc.InstallOptionsButton)</Text> | 31 | <Text>#(loc.InstallOptionsButton)</Text> |
| 32 | <ChangePageAction Page="Options" /> | 32 | <ChangePageAction Page="Options" /> |
| 33 | </Button> | 33 | </Button> |
| 34 | <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button> | 34 | <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.InstallInstallButton)</Button> |
| 35 | <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | 35 | <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> |
| 36 | <Text>#(loc.InstallCancelButton)</Text> | 36 | <Text>#(loc.InstallCancelButton)</Text> |
| 37 | <CloseWindowAction /> | 37 | <CloseWindowAction /> |
| @@ -68,8 +68,8 @@ | |||
| 68 | <Page Name="Modify"> | 68 | <Page Name="Modify"> |
| 69 | <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label> | 69 | <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label> |
| 70 | <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button> | 70 | <Button Name="ModifyUpdateButton" X="11" Y="-11" Width="200" Height="23" TabStop="yes" FontId="0" EnableCondition="WixStdBAUpdateAvailable" HideWhenDisabled="yes">#(loc.UpdateButton)</Button> |
| 71 | <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button> | 71 | <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.ModifyRepairButton)</Button> |
| 72 | <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button> | 72 | <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" ElevationShieldCondition='(WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3) AND WixStdBAScope = "PerMachine"'>#(loc.ModifyUninstallButton)</Button> |
| 73 | <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | 73 | <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> |
| 74 | <Text>#(loc.ModifyCancelButton)</Text> | 74 | <Text>#(loc.ModifyCancelButton)</Text> |
| 75 | <CloseWindowAction /> | 75 | <CloseWindowAction /> |
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/thmutil.h b/src/libs/dutil/WixToolset.DUtil/inc/thmutil.h index 14e20c0d..d67b1476 100644 --- a/src/libs/dutil/WixToolset.DUtil/inc/thmutil.h +++ b/src/libs/dutil/WixToolset.DUtil/inc/thmutil.h | |||
| @@ -69,6 +69,7 @@ typedef enum THEME_CONTROL_AUTOMATIC_BEHAVIOR_TYPE | |||
| 69 | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VALUE = 0x8, | 69 | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VALUE = 0x8, |
| 70 | // This has no effect on editboxes since their text is their value. | 70 | // This has no effect on editboxes since their text is their value. |
| 71 | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_TEXT = 0x10, | 71 | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_TEXT = 0x10, |
| 72 | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ELEVATION_SHIELD = 0x20, | ||
| 72 | } THEME_CONTROL_AUTOMATIC_BEHAVIOR_TYPE; | 73 | } THEME_CONTROL_AUTOMATIC_BEHAVIOR_TYPE; |
| 73 | 74 | ||
| 74 | typedef enum THEME_CONTROL_TYPE | 75 | typedef enum THEME_CONTROL_TYPE |
| @@ -238,12 +239,14 @@ typedef struct _THEME_CONTROL | |||
| 238 | 239 | ||
| 239 | LPWSTR sczEnableCondition; | 240 | LPWSTR sczEnableCondition; |
| 240 | LPWSTR sczVisibleCondition; | 241 | LPWSTR sczVisibleCondition; |
| 242 | LPWSTR sczElevationShieldCondition; | ||
| 241 | 243 | ||
| 242 | BOOL fAutomaticEnabled; | 244 | BOOL fAutomaticEnabled; |
| 243 | BOOL fAutomaticVisible; | 245 | BOOL fAutomaticVisible; |
| 244 | BOOL fAutomaticAction; | 246 | BOOL fAutomaticAction; |
| 245 | BOOL fAutomaticValue; | 247 | BOOL fAutomaticValue; |
| 246 | BOOL fAutomaticText; | 248 | BOOL fAutomaticText; |
| 249 | BOOL fAutomaticElevationShield; | ||
| 247 | 250 | ||
| 248 | union | 251 | union |
| 249 | { | 252 | { |
diff --git a/src/libs/dutil/WixToolset.DUtil/thmutil.cpp b/src/libs/dutil/WixToolset.DUtil/thmutil.cpp index 4482c96e..10e00c78 100644 --- a/src/libs/dutil/WixToolset.DUtil/thmutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/thmutil.cpp | |||
| @@ -3538,6 +3538,9 @@ static HRESULT ParseControl( | |||
| 3538 | } | 3538 | } |
| 3539 | else if (THEME_CONTROL_TYPE_HYPERLINK == pControl->type || THEME_CONTROL_TYPE_BUTTON == pControl->type) | 3539 | else if (THEME_CONTROL_TYPE_HYPERLINK == pControl->type || THEME_CONTROL_TYPE_BUTTON == pControl->type) |
| 3540 | { | 3540 | { |
| 3541 | hr = XmlGetAttributeEx(pixn, L"ElevationShieldCondition", &pControl->sczElevationShieldCondition); | ||
| 3542 | ThmExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed when querying control '%ls' ElevationShieldCondition attribute.", pControl->sczName); | ||
| 3543 | |||
| 3541 | hr = GetAttributeFontId(pTheme, pixn, L"HoverFontId", &pControl->dwFontHoverId); | 3544 | hr = GetAttributeFontId(pTheme, pixn, L"HoverFontId", &pControl->dwFontHoverId); |
| 3542 | ThmExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed when querying control '%ls' HoverFontId attribute.", pControl->sczName); | 3545 | ThmExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed when querying control '%ls' HoverFontId attribute.", pControl->sczName); |
| 3543 | 3546 | ||
| @@ -4826,6 +4829,7 @@ static void FreeControl( | |||
| 4826 | ReleaseStr(pControl->sczNote); | 4829 | ReleaseStr(pControl->sczNote); |
| 4827 | ReleaseStr(pControl->sczEnableCondition); | 4830 | ReleaseStr(pControl->sczEnableCondition); |
| 4828 | ReleaseStr(pControl->sczVisibleCondition); | 4831 | ReleaseStr(pControl->sczVisibleCondition); |
| 4832 | ReleaseStr(pControl->sczElevationShieldCondition); | ||
| 4829 | ReleaseStr(pControl->sczValue); | 4833 | ReleaseStr(pControl->sczValue); |
| 4830 | ReleaseStr(pControl->sczVariable); | 4834 | ReleaseStr(pControl->sczVariable); |
| 4831 | 4835 | ||
| @@ -5625,6 +5629,7 @@ static HRESULT ShowControl( | |||
| 5625 | 5629 | ||
| 5626 | BOOL fEnabled = !(pControl->dwInternalStyle & INTERNAL_CONTROL_STYLE_DISABLED); | 5630 | BOOL fEnabled = !(pControl->dwInternalStyle & INTERNAL_CONTROL_STYLE_DISABLED); |
| 5627 | BOOL fVisible = !(pControl->dwInternalStyle & INTERNAL_CONTROL_STYLE_HIDDEN); | 5631 | BOOL fVisible = !(pControl->dwInternalStyle & INTERNAL_CONTROL_STYLE_HIDDEN); |
| 5632 | BOOL fShield = FALSE; | ||
| 5628 | 5633 | ||
| 5629 | if (pTheme->pfnEvaluateCondition) | 5634 | if (pTheme->pfnEvaluateCondition) |
| 5630 | { | 5635 | { |
| @@ -5641,6 +5646,13 @@ static HRESULT ShowControl( | |||
| 5641 | hr = pTheme->pfnEvaluateCondition(pControl->sczEnableCondition, &fEnabled, pTheme->pvVariableContext); | 5646 | hr = pTheme->pfnEvaluateCondition(pControl->sczEnableCondition, &fEnabled, pTheme->pvVariableContext); |
| 5642 | ThmExitOnFailure(hr, "Failed to evaluate EnableCondition: %ls", pControl->sczEnableCondition); | 5647 | ThmExitOnFailure(hr, "Failed to evaluate EnableCondition: %ls", pControl->sczEnableCondition); |
| 5643 | } | 5648 | } |
| 5649 | |||
| 5650 | // If the control has an ElevationShieldCondition, check if it's true. | ||
| 5651 | if (pControl->sczElevationShieldCondition && pControl->fAutomaticElevationShield) | ||
| 5652 | { | ||
| 5653 | hr = pTheme->pfnEvaluateCondition(pControl->sczElevationShieldCondition, &fShield, pTheme->pvVariableContext); | ||
| 5654 | ThmExitOnFailure(hr, "Failed to evaluate ElevationShieldCondition: %ls", pControl->sczElevationShieldCondition); | ||
| 5655 | } | ||
| 5644 | } | 5656 | } |
| 5645 | 5657 | ||
| 5646 | // Try to format each control's text based on context, except for editboxes since their text comes from the user. | 5658 | // Try to format each control's text based on context, except for editboxes since their text comes from the user. |
| @@ -5816,6 +5828,8 @@ static HRESULT ShowControl( | |||
| 5816 | } | 5828 | } |
| 5817 | } | 5829 | } |
| 5818 | 5830 | ||
| 5831 | ThemeControlElevates(pControl, fShield); | ||
| 5832 | |||
| 5819 | if (!fVisible || (!fEnabled && (pControl->dwInternalStyle & INTERNAL_CONTROL_STYLE_HIDE_WHEN_DISABLED))) | 5833 | if (!fVisible || (!fEnabled && (pControl->dwInternalStyle & INTERNAL_CONTROL_STYLE_HIDE_WHEN_DISABLED))) |
| 5820 | { | 5834 | { |
| 5821 | ::ShowWindow(hWnd, SW_HIDE); | 5835 | ::ShowWindow(hWnd, SW_HIDE); |
| @@ -6283,6 +6297,7 @@ static HRESULT LoadControls( | |||
| 6283 | pControl->fAutomaticAction = THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ACTION != (THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ACTION & dwAutomaticBehaviorType); | 6297 | pControl->fAutomaticAction = THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ACTION != (THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ACTION & dwAutomaticBehaviorType); |
| 6284 | pControl->fAutomaticText = THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_TEXT != (THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_TEXT & dwAutomaticBehaviorType); | 6298 | pControl->fAutomaticText = THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_TEXT != (THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_TEXT & dwAutomaticBehaviorType); |
| 6285 | pControl->fAutomaticValue = THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VALUE != (THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VALUE & dwAutomaticBehaviorType); | 6299 | pControl->fAutomaticValue = THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VALUE != (THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VALUE & dwAutomaticBehaviorType); |
| 6300 | pControl->fAutomaticElevationShield = THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ELEVATION_SHIELD != (THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ELEVATION_SHIELD & dwAutomaticBehaviorType); | ||
| 6286 | 6301 | ||
| 6287 | // This range is reserved for thmutil. The process will run out of available window handles before reaching the end of the range. | 6302 | // This range is reserved for thmutil. The process will run out of available window handles before reaching the end of the range. |
| 6288 | if (THEME_FIRST_AUTO_ASSIGN_CONTROL_ID <= wControlId && THEME_FIRST_ASSIGN_CONTROL_ID > wControlId) | 6303 | if (THEME_FIRST_AUTO_ASSIGN_CONTROL_ID <= wControlId && THEME_FIRST_ASSIGN_CONTROL_ID > wControlId) |
diff --git a/src/xsd/thmutil/Button.xsd b/src/xsd/thmutil/Button.xsd index e7688cf4..8d6a0aaf 100644 --- a/src/xsd/thmutil/Button.xsd +++ b/src/xsd/thmutil/Button.xsd | |||
| @@ -30,6 +30,11 @@ | |||
| 30 | </choice> | 30 | </choice> |
| 31 | <attributeGroup ref="CommonControlAttributes" /> | 31 | <attributeGroup ref="CommonControlAttributes" /> |
| 32 | <attributeGroup ref="OwnerDrawImageAttributes" /> | 32 | <attributeGroup ref="OwnerDrawImageAttributes" /> |
| 33 | <attribute name="ElevationShieldCondition" type="xs:string"> | ||
| 34 | <annotation> | ||
| 35 | <documentation>A condition that determines if the control gets a UAC elevation shield icon. If this condition is true, then the control gets a UAC elevation shield icon.</documentation> | ||
| 36 | </annotation> | ||
| 37 | </attribute> | ||
| 33 | <attribute name="FontId" type="xs:string"> | 38 | <attribute name="FontId" type="xs:string"> |
| 34 | <annotation> | 39 | <annotation> |
| 35 | <documentation>Identifier to the Font element that serves as the font for the control. Only valid when using graphic buttons.</documentation> | 40 | <documentation>Identifier to the Font element that serves as the font for the control. Only valid when using graphic buttons.</documentation> |
| @@ -53,4 +58,4 @@ | |||
| 53 | </annotation> | 58 | </annotation> |
| 54 | </attribute> | 59 | </attribute> |
| 55 | </complexType> | 60 | </complexType> |
| 56 | </element> \ No newline at end of file | 61 | </element> |
diff --git a/src/xsd/thmutil/CommandLink.xsd b/src/xsd/thmutil/CommandLink.xsd index f9ec27c9..15e7e533 100644 --- a/src/xsd/thmutil/CommandLink.xsd +++ b/src/xsd/thmutil/CommandLink.xsd | |||
| @@ -23,6 +23,11 @@ | |||
| 23 | <element ref="Text" /> | 23 | <element ref="Text" /> |
| 24 | </choice> | 24 | </choice> |
| 25 | <attributeGroup ref="CommonControlAttributes" /> | 25 | <attributeGroup ref="CommonControlAttributes" /> |
| 26 | <attribute name="ElevationShieldCondition" type="xs:string"> | ||
| 27 | <annotation> | ||
| 28 | <documentation>A condition that determines if the control gets a UAC elevation shield icon. If this condition is true, then the control gets a UAC elevation shield icon.</documentation> | ||
| 29 | </annotation> | ||
| 30 | </attribute> | ||
| 26 | <attribute name="FontId" type="xs:string"> | 31 | <attribute name="FontId" type="xs:string"> |
| 27 | <annotation> | 32 | <annotation> |
| 28 | <documentation>Identifier to the Font element that serves as the font for the control. Only valid when using graphic buttons.</documentation> | 33 | <documentation>Identifier to the Font element that serves as the font for the control. Only valid when using graphic buttons.</documentation> |
| @@ -68,4 +73,4 @@ | |||
| 68 | </annotation> | 73 | </annotation> |
| 69 | </attribute> | 74 | </attribute> |
| 70 | </complexType> | 75 | </complexType> |
| 71 | </element> \ No newline at end of file | 76 | </element> |
