|
9 | 9 | <!-- UpgradeCode GUID MUST REMAIN SAME THROUGHOUT ALL VERSIONS, otherwise, updates won't occur. --> |
10 | 10 | <?if $(sys.BUILDARCH)=x64?> |
11 | 11 | <?define UpgradeCode = "31ab5147-9a97-4452-8443-d9709f0516e1" ?> |
| 12 | + <?define ExplorerContextMenuDialogText = "&$(var.ProductName) $(env.ProductSemanticVersion)"?> |
12 | 13 | <?else?> |
13 | 14 | <?define UpgradeCode = "1d00683b-0f84-4db8-a64f-2f98ad42fe06" ?> |
| 15 | + <?define ExplorerContextMenuDialogText = "&$(var.ProductName) $(env.ProductSemanticVersion) ($(sys.BUILDARCH))"?> |
14 | 16 | <?endif?> |
15 | 17 | <?define ProductVersion = "$(env.ProductVersion)" ?> |
16 | 18 | <?define ProductSemanticVersion = "$(env.ProductSemanticVersion)" ?> |
17 | 19 | <?define ProductVersionWithName = "$(var.ProductName)_$(var.ProductVersion)"?> |
18 | 20 | <?define ProductSemanticVersionWithName = "$(var.ProductName)-$(env.ProductSemanticVersion)"?> |
19 | 21 | <?define ProductProgFilesDir = "$(env.ProductProgFilesDir)" ?> |
20 | 22 | <!-- Explorer context submenu entries. The ampersand denotes the keyboard shortcut. --> |
21 | | - <?define ExplorerContextMenuDialogText = "Open &here"?> |
22 | | - <?define ExplorerContextMenuElevatedDialogText = "Open here as &Administrator"?> |
| 23 | + <?define ExplorerContextSubMenuDialogText = "Open &here"?> |
| 24 | + <?define ExplorerContextSubMenuElevatedDialogText = "Open here as &Administrator"?> |
23 | 25 | <!-- The ProductCode is Product Id: http://wixtoolset.org/documentation/manual/v3/xsd/wix/product.html --> |
24 | 26 | <Product Id="$(var.ProductGuid)" Name="$(var.ProductSemanticVersionWithName)-$(sys.BUILDARCH)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.UpgradeCode)"> |
25 | 27 | <!-- Properties About The Package --> |
|
127 | 129 | <Component Id="ExplorerContextMenu" Guid="{df82e941-fced-4de9-aef8-c81a2946dd68}"> |
128 | 130 | <Condition>ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL</Condition> |
129 | 131 | <!-- When clicking on background in Explorer --> |
130 | | - <RegistryKey Root="HKCR" Key="Directory\Background\shell\$(var.ProductName)$(env.ProductSemanticVersion)"> |
131 | | - <RegistryValue Type="string" Name="MUIVerb" Value="&$(var.ProductName) $(env.ProductSemanticVersion)"/> |
| 132 | + <RegistryKey Root="HKCR" Key="Directory\Background\shell\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)"> |
| 133 | + <RegistryValue Type="string" Name="MUIVerb" Value="$(var.ExplorerContextMenuDialogText)"/> |
132 | 134 | <RegistryValue Type="string" Name="Icon" Value="[$(var.ProductVersionWithName)]assets\Powershell_black.ico"/> |
133 | | - <RegistryValue Type="string" Name="ExtendedSubCommandsKey" Value="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)"/> |
| 135 | + <RegistryValue Type="string" Name="ExtendedSubCommandsKey" Value="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)"/> |
134 | 136 | </RegistryKey> |
135 | 137 | <!-- When clicking on Drive in Explorer --> |
136 | | - <RegistryKey Root="HKCR" Key="Drive\shell\$(var.ProductName)$(env.ProductSemanticVersion)"> |
137 | | - <RegistryValue Type="string" Name="MUIVerb" Value="&$(var.ProductName) $(env.ProductSemanticVersion)"/> |
| 138 | + <RegistryKey Root="HKCR" Key="Drive\shell\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)"> |
| 139 | + <RegistryValue Type="string" Name="MUIVerb" Value="$(var.ExplorerContextMenuDialogText)"/> |
138 | 140 | <RegistryValue Type="string" Name="Icon" Value="[$(var.ProductVersionWithName)]assets\Powershell_black.ico"/> |
139 | | - <RegistryValue Type="string" Name="ExtendedSubCommandsKey" Value="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)"/> |
| 141 | + <RegistryValue Type="string" Name="ExtendedSubCommandsKey" Value="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)"/> |
140 | 142 | </RegistryKey> |
141 | 143 | <!-- When clicking on Desktop background in Explorer --> |
142 | | - <RegistryKey Root="HKCR" Key="DesktopBackground\shell\$(var.ProductName)$(env.ProductSemanticVersion)"> |
143 | | - <RegistryValue Type="string" Name="MUIVerb" Value="&$(var.ProductName) $(env.ProductSemanticVersion)"/> |
| 144 | + <RegistryKey Root="HKCR" Key="DesktopBackground\shell\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)"> |
| 145 | + <RegistryValue Type="string" Name="MUIVerb" Value="$(var.ExplorerContextMenuDialogText)"/> |
144 | 146 | <RegistryValue Type="string" Name="Icon" Value="[$(var.ProductVersionWithName)]assets\Powershell_black.ico"/> |
145 | | - <RegistryValue Type="string" Name="ExtendedSubCommandsKey" Value="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)"/> |
| 147 | + <RegistryValue Type="string" Name="ExtendedSubCommandsKey" Value="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)"/> |
146 | 148 | </RegistryKey> |
147 | 149 | <!-- When clicking on folder in Explorer --> |
148 | | - <RegistryKey Root="HKCR" Key="Directory\shell\$(var.ProductName)$(env.ProductSemanticVersion)"> |
149 | | - <RegistryValue Type="string" Name="MUIVerb" Value="&$(var.ProductName) $(env.ProductSemanticVersion)"/> |
| 150 | + <RegistryKey Root="HKCR" Key="Directory\shell\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)"> |
| 151 | + <RegistryValue Type="string" Name="MUIVerb" Value="$(var.ExplorerContextMenuDialogText)"/> |
150 | 152 | <RegistryValue Type="string" Name="Icon" Value="[$(var.ProductVersionWithName)]assets\Powershell_black.ico"/> |
151 | | - <RegistryValue Type="string" Name="ExtendedSubCommandsKey" Value="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)"/> |
| 153 | + <RegistryValue Type="string" Name="ExtendedSubCommandsKey" Value="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)"/> |
152 | 154 | </RegistryKey> |
153 | 155 | <!-- Sub menus to open PowerShell at the current location either as a normal shell or as Administrator --> |
154 | | - <RegistryKey Root="HKCR" Key="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)\shell\open"> |
155 | | - <RegistryValue Type="string" Name="MUIVerb" Value="$(var.ExplorerContextMenuDialogText)"/> |
| 156 | + <RegistryKey Root="HKCR" Key="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)\shell\open"> |
| 157 | + <RegistryValue Type="string" Name="MUIVerb" Value="$(var.ExplorerContextSubMenuDialogText)"/> |
156 | 158 | <RegistryValue Type="string" Name="Icon" Value="[$(var.ProductVersionWithName)]assets\Powershell_black.ico"/> |
157 | 159 | </RegistryKey> |
158 | | - <RegistryKey Root="HKCR" Key="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)\shell\open\command"> |
| 160 | + <RegistryKey Root="HKCR" Key="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)\shell\open\command"> |
159 | 161 | <RegistryValue Type="string" Value="[$(var.ProductVersionWithName)]pwsh.exe -NoExit -Command Set-Location -LiteralPath '%V'"/> |
160 | 162 | </RegistryKey> |
161 | | - <RegistryKey Root="HKCR" Key="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)\shell\runas"> |
162 | | - <RegistryValue Type="string" Name="MUIVerb" Value="$(var.ExplorerContextMenuElevatedDialogText)"/> |
| 163 | + <RegistryKey Root="HKCR" Key="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)\shell\runas"> |
| 164 | + <RegistryValue Type="string" Name="MUIVerb" Value="$(var.ExplorerContextSubMenuElevatedDialogText)"/> |
163 | 165 | <RegistryValue Type="string" Name="Icon" Value="[$(var.ProductVersionWithName)]assets\Powershell_black.ico"/> |
164 | 166 | <RegistryValue Type="string" Value="" Name="HasLUAShield"/> |
165 | 167 | </RegistryKey> |
166 | | - <RegistryKey Root="HKCR" Key="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)\shell\runas\command"> |
| 168 | + <RegistryKey Root="HKCR" Key="Directory\ContextMenus\$(var.ProductName)$(env.ProductSemanticVersion)$(sys.BUILDARCH)\shell\runas\command"> |
167 | 169 | <RegistryValue Type="string" Value="[$(var.ProductVersionWithName)]pwsh.exe -NoExit -Command Set-Location -LiteralPath '%V'"/> |
168 | 170 | </RegistryKey> |
169 | 171 | </Component> |
|
188 | 190 | <UI> |
189 | 191 | <Dialog Id="ExplorerContextMenuDialog" Width="370" Height="270" Title="!(loc.ExitDialog_Title)"> |
190 | 192 | <!-- If the checkbox is defined first, then the checkbox can be ticked and unticked using the spacebar --> |
191 | | - <Control Id="ContextMenuOpenPowerShell" Type="CheckBox" X="20" Y="60" Width="290" Height="17" Property="ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL" CheckBoxValue="0" Text="Add '$(var.ExplorerContextMenuDialogText)' context menus to Explorer"/> |
| 193 | + <Control Id="ContextMenuOpenPowerShell" Type="CheckBox" X="20" Y="60" Width="290" Height="17" Property="ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL" CheckBoxValue="0" Text="Add '$(var.ExplorerContextSubMenuDialogText)' context menus to Explorer"/> |
192 | 194 | <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)"/> |
193 | 195 | <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Cancel="yes" Default="yes" Text="!(loc.WixUINext)"/> |
194 | 196 | <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)"> |
|
0 commit comments