2022-01-06 02:28:09 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<?define UpgradeCode="6341382d-c0a9-4238-9188-be9607e3fab2"?>
<?define RepoDir="$(var.ProjectDir)..\..\" ?>
<?define BinX64Dir="$(var.RepoDir)x64\$(var.Configuration)\" ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="PowerToys (Preview) $(sys.BUILDARCH)"
Version="$(var.Version)"
Manufacturer="Microsoft Corporation"
IconSourceFile="$(var.BinX64Dir)svgs\icon.ico"
UpgradeCode="$(var.UpgradeCode)">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
LicenseFile="$(var.RepoDir)\installer\License.rtf"
LogoFile="$(var.RepoDir)\installer\MSIX\Images\logo44.png"
SuppressOptionsUI="no"
SuppressRepair="yes" />
</BootstrapperApplicationRef>
2022-04-05 22:03:10 +08:00
<util:FileSearch Variable="HasDotnet3123" Path="[ProgramFiles64Folder]dotnet\shared\Microsoft.WindowsDesktop.App\3.1.23\System.Xaml.dll" Result="exists" />
2022-03-16 18:54:01 +08:00
<util:FileSearch Variable="HasDotnet603" Path="[ProgramFiles64Folder]dotnet\shared\Microsoft.WindowsDesktop.App\6.0.3\System.Xaml.dll" Result="exists" />
2022-01-29 01:22:12 +08:00
<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" />
2022-01-06 02:28:09 +08:00
<Variable Name="InstallFolder" Type="string" Value="[ProgramFiles64Folder]PowerToys" bal:Overridable="yes"/>
2022-03-16 19:39:00 +08:00
<Variable Name="MsiLogFolder" Type="string" Value="[LocalAppDataFolder]\Microsoft\PowerToys\" />
<Log Disable="no" Prefix='powertoys-bootstrapper-msi-$(var.Version)' Extension=".log" />
2022-01-06 02:28:09 +08:00
<!-- Only install/upgrade if the version is greater or equal than the currently installed version of PowerToys, to handle the case in which PowerToys was installed from old MSI (before WiX bootstrapper was used) -->
<!-- If the previous installation is a bundle installation, just let WiX run its logic. -->
<Variable Name="DetectedPowerToysVersion" Type="version" Value="0.0.0.0"/>
<Variable Name="TargetPowerToysVersion" Type="version" Value="$(var.Version)"/>
<util:ProductSearch Id="SearchInstalledPowerToysVersion" Variable="DetectedPowerToysVersion" UpgradeCode="42B84BF7-5FBF-473B-9C8B-049DC16F7708" Result="version" />
<bal:Condition Message="A later version of PowerToys is already installed." >TargetPowerToysVersion >= DetectedPowerToysVersion OR WixBundleInstalled</bal:Condition>
<Variable Name="DetectedWindowsBuildNumber" Type="version" Value="0"/>
<util:RegistrySearch Id="SearchWindowsBuildNumber" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Value="CurrentBuildNumber" Result="value" Format="raw" Variable="DetectedWindowsBuildNumber" />
<bal:Condition Message="This application is only supported on Windows 10 version 1903 (build 18362) or higher.">DetectedWindowsBuildNumber >= 18362 OR WixBundleInstalled</bal:Condition>
<Chain>
<ExePackage
2022-04-05 22:03:10 +08:00
Name="windowsdesktop-runtime-3.1.23-win-x64.exe"
2022-01-06 02:28:09 +08:00
Compressed="no"
Id="DotnetRuntime"
2022-04-05 22:03:10 +08:00
DetectCondition="HasDotnet3123"
DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/0bc6a80a-3f07-411d-8ce3-17aaeb7388ac/ed1000a04fc9c8dca5af35b53263d9ae/windowsdesktop-runtime-3.1.23-win-x64.exe"
2022-03-03 18:09:47 +08:00
InstallCommand="/install /quiet /norestart"
RepairCommand="/repair /passive /norestart"
2022-01-06 02:28:09 +08:00
Permanent="yes"
PerMachine="yes"
2022-03-03 18:09:47 +08:00
UninstallCommand="/uninstall /quiet /norestart">
2022-02-11 00:18:05 +08:00
<ExitCode Value="1638" Behavior="success"/>
2022-01-06 02:28:09 +08:00
<RemotePayload
2022-04-05 22:03:10 +08:00
Description="Microsoft Windows Desktop Runtime - 3.1.23 (x64)"
ProductName="Microsoft Windows Desktop Runtime - 3.1.23 (x64)"
Size="54413248"
Version="3.1.23.31022"
Hash="460D8CD07672A7B686867B0E6CF85A745005AA43" />
2022-01-06 02:28:09 +08:00
</ExePackage>
2022-01-18 22:52:22 +08:00
<ExePackage
2022-03-16 18:54:01 +08:00
Name="windowsdesktop-runtime-6.0.3-win-x64.exe"
2022-01-18 22:52:22 +08:00
Compressed="no"
2022-02-07 22:08:30 +08:00
Id="DotnetRuntime6"
2022-03-16 18:54:01 +08:00
DetectCondition="HasDotnet603"
DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/7f3a766e-9516-4579-aaf2-2b150caa465c/d57665f880cdcce816b278a944092965/windowsdesktop-runtime-6.0.3-win-x64.exe"
2022-03-03 18:09:47 +08:00
InstallCommand="/install /quiet /norestart"
RepairCommand="/repair /passive /norestart"
2022-01-18 22:52:22 +08:00
Permanent="yes"
PerMachine="yes"
2022-03-03 18:09:47 +08:00
UninstallCommand="/uninstall /quiet /norestart">
2022-02-11 00:18:05 +08:00
<ExitCode Value="1638" Behavior="success"/>
2022-01-18 22:52:22 +08:00
<RemotePayload
2022-03-16 18:54:01 +08:00
Description="Microsoft Windows Desktop Runtime - 6.0.3 (x64)"
ProductName="Microsoft Windows Desktop Runtime - 6.0.3 (x64)"
Size="57153808"
Version="6.0.3.31024"
Hash="85EB71B760EBA108348824A4928ED2BA9775BE76" />
2022-01-18 22:52:22 +08:00
</ExePackage>
2022-01-26 04:02:10 +08:00
<ExePackage
Name="MicrosoftEdgeWebview2Setup.exe"
2022-01-29 01:22:12 +08:00
Compressed="yes"
2022-01-26 04:02:10 +08:00
Id="WebView2"
2022-01-29 01:22:12 +08:00
DetectCondition="HasWebView2PerMachine OR HasWebView2PerUser"
SourceFile="WebView2\MicrosoftEdgeWebview2Setup.exe"
2022-01-26 04:02:10 +08:00
InstallCommand="/silent /install"
RepairCommand="/repair /passive"
Permanent="yes"
PerMachine="yes"
UninstallCommand="/silent /uninstall">
</ExePackage>
2022-01-06 02:28:09 +08:00
<MsiPackage
SourceFile="x64\Release\PowerToysSetup-$(var.Version)-x64.msi"
Compressed="yes"
DisplayInternalUI="no">
<MsiProperty Name="BOOTSTRAPPERINSTALLFOLDER" Value="[InstallFolder]" />
</MsiPackage>
</Chain>
</Bundle>
</Wix>