mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-06-30 23:49:42 +02:00
Compare commits
7 Commits
powerscrip
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a68756630 | ||
|
|
50c78e51d8 | ||
|
|
177a569a86 | ||
|
|
99920a7da0 | ||
|
|
7405c97d79 | ||
|
|
4bf2f38bb0 | ||
|
|
e10b817ef0 |
1
.github/actions/spell-check/expect.txt
vendored
1
.github/actions/spell-check/expect.txt
vendored
@@ -1531,6 +1531,7 @@ reparenting
|
||||
reportfileaccesses
|
||||
requery
|
||||
requerying
|
||||
redist
|
||||
rescap
|
||||
resgen
|
||||
resheader
|
||||
|
||||
@@ -11,6 +11,34 @@
|
||||
- GPO checking
|
||||
- Process termination
|
||||
|
||||
### Bootstrapper Prerequisites
|
||||
|
||||
The bootstrapper (`PowerToys.wxs`) installs prerequisites before the main MSI runs:
|
||||
|
||||
| Prerequisite | Detection | Install source |
|
||||
|---|---|---|
|
||||
| Microsoft Edge WebView2 | Registry: `EdgeUpdate\Clients\{F3017226…}` | Bundled stub that downloads the runtime |
|
||||
| Microsoft Visual C++ 2015-2022 Redistributable | `HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\{x64|arm64}` value `Installed` exists | Downloaded from `https://aka.ms/vs/17/release/vc_redist.{x64|arm64}.exe` |
|
||||
|
||||
> **Note:** The VC++ Redistributable is marked `Vital="no"` because PowerToys ships its own
|
||||
> self-contained VC++ runtime DLLs (since v0.66). The system-wide redistributable is installed
|
||||
> as a safety net for edge cases (e.g., minimal Windows images, corrupted system DLLs) where
|
||||
> native components such as the custom-action DLL fail to load with error `0x8007007e`
|
||||
> (ERROR_MOD_NOT_FOUND). If the download or elevation fails, the bundled DLLs still cover
|
||||
> PowerToys' own binaries.
|
||||
|
||||
### Self-contained Runtimes
|
||||
|
||||
Since v0.66, PowerToys bundles the following runtimes inside its installation directory
|
||||
(hard-linked across modules to minimize disk usage):
|
||||
|
||||
- Windows App SDK runtime
|
||||
- .NET Desktop Runtime
|
||||
- Microsoft Visual C++ Runtime
|
||||
|
||||
These are installed as part of the MSI and live under `<InstallDir>\`. See
|
||||
[disk-usage-footprint.md](../disk-usage-footprint.md) for details.
|
||||
|
||||
### Installer Components
|
||||
|
||||
- Separate builds for machine-wide and user-scope installation
|
||||
|
||||
@@ -20,6 +20,25 @@
|
||||
<util:RegistrySearch Variable="HasWebView2PerMachine" Root="HKLM" Key="SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Result="exists" />
|
||||
<util:RegistrySearch Variable="HasWebView2PerUser" Root="HKCU" Key="Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Result="exists" />
|
||||
|
||||
<!-- VC++ 2015-2022 Redistributable detection. The Installed value is a DWORD set to 1 when the runtime is
|
||||
present; checking for its existence with Result="exists" gives a reliable boolean regardless of the
|
||||
registry value's internal type representation in WiX bundle conditions.
|
||||
Note: all VC++ 2015-2022 releases (v14.x) share the same "14.0" registry root even though the
|
||||
binaries ship separately for each VS version; finding the key here means at least one is installed. -->
|
||||
<?if $(var.Platform) = x64 ?>
|
||||
<util:RegistrySearch Variable="VCRedist2022Installed" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" Value="Installed" Result="exists" Win64="yes" />
|
||||
<?define VCRedistDisplayName="Microsoft Visual C++ 2015-2022 Redistributable (x64)"?>
|
||||
<?define VCRedistFileName="vc_redist.x64.exe"?>
|
||||
<?define VCRedistDownloadUrl="https://aka.ms/vs/17/release/vc_redist.x64.exe"?>
|
||||
<?elseif $(var.Platform) = arm64 ?>
|
||||
<util:RegistrySearch Variable="VCRedist2022Installed" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\arm64" Value="Installed" Result="exists" Win64="yes" />
|
||||
<?define VCRedistDisplayName="Microsoft Visual C++ 2015-2022 Redistributable (ARM64)"?>
|
||||
<?define VCRedistFileName="vc_redist.arm64.exe"?>
|
||||
<?define VCRedistDownloadUrl="https://aka.ms/vs/17/release/vc_redist.arm64.exe"?>
|
||||
<?else?>
|
||||
<?error Unsupported Platform value for VC++ redistributable: $(var.Platform). Supported values are x64 and arm64.?>
|
||||
<?endif?>
|
||||
|
||||
<?if $(var.PerUser) = "true" ?>
|
||||
<Variable Name="InstallFolder" Type="formatted" Value="[LocalAppDataFolder]PowerToys" bal:Overridable="yes" />
|
||||
<?else?>
|
||||
@@ -58,6 +77,15 @@
|
||||
</ExePackage>
|
||||
<ExePackage DisplayName="Microsoft Edge WebView2" Name="MicrosoftEdgeWebview2Setup.exe" Compressed="yes" Id="WebView2" DetectCondition="HasWebView2PerMachine OR HasWebView2PerUser" SourceFile="WebView2\MicrosoftEdgeWebview2Setup.exe" Permanent="yes" PerMachine="$(var.PerMachineYesNo)" InstallArguments="/silent /install" RepairArguments="/repair /passive" UninstallArguments="/silent /uninstall">
|
||||
</ExePackage>
|
||||
<!-- Install the VC++ 2015-2022 Redistributable when absent. The package is downloaded from Microsoft servers
|
||||
and installed before the PowerToys MSI so that native components (e.g., custom-action DLLs) can
|
||||
load successfully even on minimal or freshly-deployed Windows images.
|
||||
Vital="no" because PowerToys ships its own self-contained runtime DLLs (since v0.66), so the
|
||||
bundled copies will cover most scenarios even if this step fails (e.g., no network or elevation).
|
||||
Note: the download URL points to Microsoft's CDN over HTTPS; a pinned Hash is intentionally omitted
|
||||
here (same approach as the WebView2 entry above) because the aka.ms redirect always points to the
|
||||
latest VS 2022 release and the hash would break on every upstream update. -->
|
||||
<ExePackage DisplayName="$(var.VCRedistDisplayName)" Id="VCRedist2022" Name="$(var.VCRedistFileName)" Compressed="no" PerMachine="$(var.PerMachineYesNo)" Permanent="yes" Vital="no" DetectCondition="VCRedist2022Installed" DownloadUrl="$(var.VCRedistDownloadUrl)" InstallArguments="/install /quiet /norestart" RepairArguments="/repair /quiet /norestart" UninstallArguments="/uninstall /quiet /norestart" />
|
||||
<MsiPackage DisplayName="PowerToys MSI" SourceFile="$(var.PowerToysPlatform)\Release\$(var.MSIPath)\$(var.MSIName)" Compressed="yes" bal:DisplayInternalUICondition="false">
|
||||
<MsiProperty Name="BOOTSTRAPPERINSTALLFOLDER" Value="[InstallFolder]" />
|
||||
<MsiProperty Name="MSIRESTARTMANAGERCONTROL" Value="Disable" />
|
||||
|
||||
Reference in New Issue
Block a user