From 048b07c1cee2452a7dd477968e222ef04f8cfc0f Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Fri, 21 Mar 2025 10:39:27 +0000 Subject: [PATCH] [Installer]Properly update CmdPal on upgrade (#38070) * [Installer]Properly update CmdPal on upgrade * Update installer/PowerToysSetupCustomActions/CustomAction.cpp --- installer/PowerToysSetup/Product.wxs | 11 ++++++ .../CustomAction.cpp | 37 ++++++++++++++++++- .../CustomAction.def | 1 + 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index 2c99d84044..37256bdd68 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -179,6 +179,9 @@ Installed AND (REMOVE="ALL") + + Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL") + Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL") @@ -439,6 +442,14 @@ DllEntry="UnRegisterContextMenuPackagesCA" /> + + packagesToRemoveDisplayName{{L"PowerRenameContextMenu"}, {L"ImageResizerContextMenu"}, {L"FileLocksmithContextMenu"}, {L"NewPlusContextMenu"}, {L"Microsoft.CommandPalette"}}; + const std::vector packagesToRemoveDisplayName{{L"PowerRenameContextMenu"}, {L"ImageResizerContextMenu"}, {L"FileLocksmithContextMenu"}, {L"NewPlusContextMenu"}}; for (auto const &package : packagesToRemoveDisplayName) { diff --git a/installer/PowerToysSetupCustomActions/CustomAction.def b/installer/PowerToysSetupCustomActions/CustomAction.def index e91060b764..6e42da27c5 100644 --- a/installer/PowerToysSetupCustomActions/CustomAction.def +++ b/installer/PowerToysSetupCustomActions/CustomAction.def @@ -20,6 +20,7 @@ EXPORTS InstallDSCModuleCA InstallCmdPalPackageCA UnApplyModulesRegistryChangeSetsCA + UnRegisterCmdPalPackageCA UnRegisterContextMenuPackagesCA UninstallEmbeddedMSIXCA UninstallDSCModuleCA