Compare commits

...

2 Commits

Author SHA1 Message Date
Leilei Zhang
f23bd3ec2e check in custon action 2026-01-29 15:25:27 +08:00
Leilei Zhang
f2d25d8eef fix check 2026-01-29 15:22:45 +08:00
2 changed files with 8 additions and 1 deletions

View File

@@ -610,6 +610,13 @@ UINT __stdcall InstallPackageIdentityMSIXCA(MSIHANDLE hInstall)
hr = WcaInitialize(hInstall, "InstallPackageIdentityMSIXCA");
ExitOnFailure(hr, "Failed to initialize");
// Double-check: Only install on Windows 11 or greater
if (!package::IsWin11OrGreater())
{
Logger::info(L"Skipping PackageIdentity MSIX installation - not Windows 11 or greater");
goto LExit;
}
hr = WcaGetProperty(L"CustomActionData", &customActionData);
ExitOnFailure(hr, "Failed to get CustomActionData property");

View File

@@ -124,7 +124,7 @@
<Custom Action="SetBundleInstallLocation" After="InstallFiles" Condition="NOT Installed OR WIX_UPGRADE_DETECTED" />
<Custom Action="ApplyModulesRegistryChangeSets" After="InstallFiles" Condition="NOT Installed" />
<Custom Action="InstallCmdPalPackage" After="InstallFiles" Condition="NOT Installed" />
<Custom Action="InstallPackageIdentityMSIX" After="InstallFiles" Condition="NOT Installed AND WINDOWSBUILDNUMBER &gt;= 22000" />
<Custom Action="InstallPackageIdentityMSIX" After="InstallFiles" Condition="(NOT Installed) AND (WINDOWSBUILDNUMBER &gt;= 22000)" />
<Custom Action="override Wix4CloseApplications_$(sys.BUILDARCHSHORT)" Before="RemoveFiles" />
<Custom Action="RemovePowerToysSchTasks" After="RemoveFiles" />
<!-- TODO: Use to activate embedded MSIX -->