mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-08-29 10:09:43 +02:00
86 lines
5.1 KiB
Plaintext
86 lines
5.1 KiB
Plaintext
|
|
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
||
|
|
|
||
|
|
<?include $(sys.CURRENTDIR)\Common.wxi?>
|
||
|
|
|
||
|
|
<!--
|
||
|
|
PATH-visible shims forward to the installed PowerToys CLIs. Every command is the same
|
||
|
|
PowerToys.CliShim.exe payload installed under a different name; the shim resolves its target
|
||
|
|
from that name. tools\CliShim\CliShimManifest.props is the source of truth for the list and
|
||
|
|
the CliShim project fails the build if the two drift apart, so keep the File/@Name values and
|
||
|
|
that manifest in sync.
|
||
|
|
-->
|
||
|
|
<Fragment>
|
||
|
|
<DirectoryRef Id="CliFolder">
|
||
|
|
<Component Id="CliShim_PowerToys_FancyZones_CLI_exe" Guid="63800E2A-21B9-4A92-AD25-9C1DC7593F4F" Bitness="always64">
|
||
|
|
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||
|
|
<RegistryValue Type="string" Name="CliShim_PowerToys_FancyZones_CLI_exe" Value="" KeyPath="yes" />
|
||
|
|
</RegistryKey>
|
||
|
|
<File Source="$(var.BinDir)CliShim\PowerToys.CliShim.exe" Name="PowerToys.FancyZones.CLI.exe" Id="CliShim_PowerToys.FancyZones.CLI.exe" Checksum="yes" />
|
||
|
|
</Component>
|
||
|
|
<Component Id="CliShim_PowerToys_ImageResizer_CLI_exe" Guid="2BC274AA-FECD-4A85-BF70-06670A6B99A5" Bitness="always64">
|
||
|
|
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||
|
|
<RegistryValue Type="string" Name="CliShim_PowerToys_ImageResizer_CLI_exe" Value="" KeyPath="yes" />
|
||
|
|
</RegistryKey>
|
||
|
|
<File Source="$(var.BinDir)CliShim\PowerToys.CliShim.exe" Name="PowerToys.ImageResizer.CLI.exe" Id="CliShim_PowerToys.ImageResizer.CLI.exe" Checksum="yes" />
|
||
|
|
</Component>
|
||
|
|
<Component Id="CliShim_PowerToys_FileLocksmith_CLI_exe" Guid="2DD830DD-78D4-46EE-B23B-3EAB3D838EDF" Bitness="always64">
|
||
|
|
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||
|
|
<RegistryValue Type="string" Name="CliShim_PowerToys_FileLocksmith_CLI_exe" Value="" KeyPath="yes" />
|
||
|
|
</RegistryKey>
|
||
|
|
<File Source="$(var.BinDir)CliShim\PowerToys.CliShim.exe" Name="PowerToys.FileLocksmith.CLI.exe" Id="CliShim_PowerToys.FileLocksmith.CLI.exe" Checksum="yes" />
|
||
|
|
</Component>
|
||
|
|
<Component Id="CliShim_PowerToys_PowerDisplay_CLI_exe" Guid="E98A36C9-384E-48CB-A844-A6A49E4138D9" Bitness="always64">
|
||
|
|
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||
|
|
<RegistryValue Type="string" Name="CliShim_PowerToys_PowerDisplay_CLI_exe" Value="" KeyPath="yes" />
|
||
|
|
</RegistryKey>
|
||
|
|
<File Source="$(var.BinDir)CliShim\PowerToys.CliShim.exe" Name="PowerToys.PowerDisplay.CLI.exe" Id="CliShim_PowerToys.PowerDisplay.CLI.exe" Checksum="yes" />
|
||
|
|
</Component>
|
||
|
|
|
||
|
|
<!-- MSI broadcasts WM_SETTINGCHANGE; terminals open before install must be reopened. -->
|
||
|
|
<?if $(var.PerUser) = "true" ?>
|
||
|
|
<Component Id="cli_env_path_user" Guid="87AA86E8-81E8-44CB-9519-FC70CF7BEA56" Bitness="always64">
|
||
|
|
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||
|
|
<RegistryValue Type="string" Name="cli_env_path_user" Value="" KeyPath="yes" />
|
||
|
|
</RegistryKey>
|
||
|
|
<Environment Id="AddCliToUserPath" Name="PATH" Action="set" Part="last" System="no" Value="[CliFolder]" />
|
||
|
|
</Component>
|
||
|
|
<?else?>
|
||
|
|
<Component Id="cli_env_path_machine" Guid="739F3916-2247-4F1B-8BBD-0949A5B870F7" Bitness="always64">
|
||
|
|
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||
|
|
<RegistryValue Type="string" Name="cli_env_path_machine" Value="" KeyPath="yes" />
|
||
|
|
</RegistryKey>
|
||
|
|
<Environment Id="AddCliToMachinePath" Name="PATH" Action="set" Part="last" System="yes" Value="[CliFolder]" />
|
||
|
|
<!--
|
||
|
|
On the same component as the PATH entry on purpose: bin is only worth locking down
|
||
|
|
because it is on the machine PATH, and this way the two cannot drift apart.
|
||
|
|
CreateFolders applies the DACL before InstallFiles writes the shims, so the shims
|
||
|
|
inherit it and need no PermissionEx of their own.
|
||
|
|
-->
|
||
|
|
<CreateFolder>
|
||
|
|
<PermissionEx Sddl="$(var.MachinePathFolderSddl)" />
|
||
|
|
</CreateFolder>
|
||
|
|
</Component>
|
||
|
|
<?endif?>
|
||
|
|
</DirectoryRef>
|
||
|
|
|
||
|
|
<ComponentGroup Id="CliShimsComponentGroup">
|
||
|
|
<Component Id="RemoveCliFolder" Guid="831C56D8-9FEB-41B2-8A8C-BD49487479BB" Directory="CliFolder">
|
||
|
|
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||
|
|
<RegistryValue Type="string" Name="RemoveCliFolder" Value="" KeyPath="yes" />
|
||
|
|
</RegistryKey>
|
||
|
|
<RemoveFolder Id="RemoveFolderCliFolder" Directory="CliFolder" On="uninstall" />
|
||
|
|
</Component>
|
||
|
|
<ComponentRef Id="CliShim_PowerToys_FancyZones_CLI_exe" />
|
||
|
|
<ComponentRef Id="CliShim_PowerToys_ImageResizer_CLI_exe" />
|
||
|
|
<ComponentRef Id="CliShim_PowerToys_FileLocksmith_CLI_exe" />
|
||
|
|
<ComponentRef Id="CliShim_PowerToys_PowerDisplay_CLI_exe" />
|
||
|
|
<?if $(var.PerUser) = "true" ?>
|
||
|
|
<ComponentRef Id="cli_env_path_user" />
|
||
|
|
<?else?>
|
||
|
|
<ComponentRef Id="cli_env_path_machine" />
|
||
|
|
<?endif?>
|
||
|
|
</ComponentGroup>
|
||
|
|
|
||
|
|
</Fragment>
|
||
|
|
</Wix>
|