mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 03:07:56 +01:00
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request ## Root Cause WiX-based registration creates persistent Shell Extension entries that: 1. Load DLLs even when the module is disabled 2. Cause cross-OS version conflicts (Win11 loading Win10 extensions) ## Changes Made 1. Removed static Shell Extension registration from PowerToys installer 2. Modified modules to register Shell Extensions during Runner startup ### Modified Modules: - **PowerRename** (`src/modules/powerrename/dll/dllmain.cpp`) - **NewPlus** (`src/modules/NewPlus/NewShellExtensionContextMenu/powertoys_module.cpp`) - **ImageResizer** (`src/modules/imageresizer/dll/dllmain.cpp`) - **FileLocksmith** (`src/modules/FileLocksmith/FileLocksmithExt/PowerToysModule.cpp`) ## Known Migration Issue **Machine-level installer registry residue**: win10 with machine-level installers may have residual Shell Extension registry entries that persist with this change. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #40036 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed ## AI Summary This pull request refactors how shell extension registry keys are managed during installation and uninstallation for several PowerToys modules. The main change is moving registry key cleanup logic for context menu shell extensions (ImageResizer, FileLocksmith, PowerRename, NewPlus) from static installer definitions to new custom uninstall actions, ensuring more reliable removal and future extensibility. **Installer and Uninstall Refactoring** * Added new custom actions (`CleanImageResizerRuntimeRegistryCA`, `CleanFileLocksmithRuntimeRegistryCA`, `CleanPowerRenameRuntimeRegistryCA`, `CleanNewPlusRuntimeRegistryCA`) to programmatically clean up registry keys for each shell extension during uninstall, implemented in `CustomAction.cpp` and exported in `CustomAction.def`. [[1]](diffhunk://#diff-c502a81cdf8afa7a38f0f462709abcdbdfcc44beaa6227a1e64a26566c7e8876R1156-R1262) [[2]](diffhunk://#diff-f941d599be5fe41667eda00338af694c0f2e65709d497a66487402f13e408200R31-R34) * Registered these custom actions in `Product.wxs` and ensured they run before file removal during uninstall. [[1]](diffhunk://#diff-668b4388b55bb934d7ceccbfdd172f69257c9c607ca19cb9752d4a4940b69886R179-R190) [[2]](diffhunk://#diff-668b4388b55bb934d7ceccbfdd172f69257c9c607ca19cb9752d4a4940b69886R454-R482) **Removal of Static Registry Key Definitions** * Removed static registry key and component definitions for context menu shell extensions from their respective installer `.wxs` files (`FileLocksmith.wxs`, `ImageResizer.wxs`, `PowerRename.wxs`, `NewPlus.wxs`), relying on custom actions for cleanup instead. [[1]](diffhunk://#diff-7cf9797f8cb6609049763b3b830f6c4a7a02ba5705eb090f7e06fb9c270ca74fL17-L31) [[2]](diffhunk://#diff-7cf9797f8cb6609049763b3b830f6c4a7a02ba5705eb090f7e06fb9c270ca74fL41) [[3]](diffhunk://#diff-c6d00805ce9de0eb3f4d42874dccac17be62f36c35d57e8f863b928b5f955d3aL19-L83) [[4]](diffhunk://#diff-c6d00805ce9de0eb3f4d42874dccac17be62f36c35d57e8f863b928b5f955d3aL93) [[5]](diffhunk://#diff-d0d69eff3f2d7982679465972b7d3c46dd8006314fb28f0e3a2371e2d5ccedb0L21-L33) [[6]](diffhunk://#diff-d0d69eff3f2d7982679465972b7d3c46dd8006314fb28f0e3a2371e2d5ccedb0L43) [[7]](diffhunk://#diff-4fd109f66b896577cad2860a829617ca902b33551afaaa8840372035ade2d3f3L17-L32) [[8]](diffhunk://#diff-4fd109f66b896577cad2860a829617ca902b33551afaaa8840372035ade2d3f3L42) **Project File Update** * Added `shell_ext_registration.h` to the solution file, possibly for future shell extension registration logic. These changes improve uninstall reliability and centralize registry cleanup logic, making future maintenance and extension of shell extension registration much simpler. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
541 lines
23 KiB
XML
541 lines
23 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
|
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" >
|
|
|
|
<?include $(sys.CURRENTDIR)\Common.wxi?>
|
|
|
|
<!-- WiX Components with multiple files cause issues due to the way Windows installs them.
|
|
Windows decides whether to install a component by checking the existence of KeyPath file and its version.
|
|
Thus, if some files were updated but KeyPath file was not, the component wouldn't be updated.
|
|
Some resource files, e.g. images, do not have version, so even if Component has only a single image and a static GUID, it won't be updated.
|
|
|
|
Considering all of the above, it's much simpler to just have one file per Component with an implicit Guid.
|
|
|
|
More info:
|
|
- https://stackoverflow.com/a/1604348/657390
|
|
- https://stackoverflow.com/a/1422121/657390
|
|
- https://robmensching.com/blog/posts/2003/10/18/component-rules-101/
|
|
- https://robmensching.com/blog/posts/2003/10/4/windows-installer-components-introduction/
|
|
-->
|
|
|
|
<Product Id="*"
|
|
Name="PowerToys (Preview)"
|
|
Language="1033"
|
|
Version="$(var.Version)"
|
|
Manufacturer="Microsoft Corporation"
|
|
UpgradeCode="$(var.UpgradeCodeGUID)">
|
|
|
|
|
|
<Package InstallerVersion="500" Compressed="yes" InstallScope="$(var.InstallScope)" InstallPrivileges="$(var.InstallPrivileges)" Platform="$(var.PlatformLK)" />
|
|
|
|
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed." />
|
|
|
|
<Upgrade Id="$(var.UpgradeCodeGUID)">
|
|
<UpgradeVersion
|
|
Minimum="0.0.0" Maximum="$(var.Version)"
|
|
Property="PREVIOUSVERSIONSINSTALLED"
|
|
IncludeMinimum="yes" IncludeMaximum="no" />
|
|
</Upgrade>
|
|
|
|
<MediaTemplate EmbedCab="yes" />
|
|
|
|
<Property Id="REINSTALLMODE" Value="amus" />
|
|
<Property Id="WINDOWSBUILDNUMBER" Secure="yes">
|
|
<RegistrySearch Id="BuildNumberSearch" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Name="CurrentBuildNumber" Type="raw" />
|
|
</Property>
|
|
<Condition Message="This application is only supported on Windows 10 version v2004 (build 19041) or higher.">
|
|
<![CDATA[(WINDOWSBUILDNUMBER >= 19041)]]>
|
|
</Condition>
|
|
|
|
<Icon Id="powertoys.exe" SourceFile="$(var.BinDir)svgs\icon.ico"/>
|
|
|
|
<Property Id="ARPPRODUCTICON" Value="powertoys.exe" />
|
|
|
|
<Feature Id="CoreFeature" Title="PowerToys" AllowAdvertise="no" Absent="disallow" TypicalDefault="install"
|
|
Description="Contains all PowerToys features.">
|
|
<ComponentGroupRef Id="CoreComponents" />
|
|
<ComponentGroupRef Id="BaseApplicationsComponentGroup" />
|
|
<ComponentGroupRef Id="WinUI3ApplicationsComponentGroup" />
|
|
<ComponentGroupRef Id="AwakeComponentGroup" />
|
|
<ComponentGroupRef Id="ColorPickerComponentGroup" />
|
|
<ComponentGroupRef Id="FileExplorerPreviewComponentGroup" />
|
|
<ComponentGroupRef Id="FileLocksmithComponentGroup" />
|
|
<ComponentGroupRef Id="HostsComponentGroup" />
|
|
<ComponentGroupRef Id="ImageResizerComponentGroup" />
|
|
<ComponentGroupRef Id="KeyboardManagerComponentGroup" />
|
|
<ComponentGroupRef Id="PeekComponentGroup" />
|
|
<ComponentGroupRef Id="PowerRenameComponentGroup" />
|
|
<ComponentGroupRef Id="RegistryPreviewComponentGroup" />
|
|
<ComponentGroupRef Id="RunComponentGroup" />
|
|
<ComponentGroupRef Id="SettingsComponentGroup" />
|
|
<ComponentGroupRef Id="ShortcutGuideComponentGroup" />
|
|
<ComponentGroupRef Id="MouseWithoutBordersComponentGroup" />
|
|
<ComponentGroupRef Id="EnvironmentVariablesComponentGroup" />
|
|
<ComponentGroupRef Id="AdvancedPasteComponentGroup" />
|
|
<ComponentGroupRef Id="NewPlusComponentGroup" />
|
|
<ComponentGroupRef Id="NewPlusTemplatesComponentGroup" />
|
|
<ComponentGroupRef Id="ResourcesComponentGroup" />
|
|
<ComponentGroupRef Id="WindowsAppSDKComponentGroup" />
|
|
<ComponentGroupRef Id="ToolComponentGroup" />
|
|
<ComponentGroupRef Id="MonacoSRCHeatGenerated" />
|
|
<ComponentGroupRef Id="WorkspacesComponentGroup" />
|
|
<ComponentGroupRef Id="CmdPalComponentGroup" />
|
|
</Feature>
|
|
|
|
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLFOLDER]" After="CostFinalize" />
|
|
|
|
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
|
|
|
|
<UI>
|
|
<UIRef Id="WixUI_InstallDir"/>
|
|
<Publish Dialog="WelcomeDlg"
|
|
Control="Next"
|
|
Event="NewDialog"
|
|
Value="InstallDirDlg"
|
|
Order="99">1</Publish>
|
|
<Publish Dialog="InstallDirDlg"
|
|
Control="Back"
|
|
Event="NewDialog"
|
|
Value="WelcomeDlg"
|
|
Order="99">1</Publish>
|
|
|
|
<Publish Dialog="ExitDialog"
|
|
Control="Finish"
|
|
Event="EndDialog"
|
|
Value="Return">NOT Installed</Publish>
|
|
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Property="_REMOVE_ALL" Value="Yes">1</Publish>
|
|
<Publish Dialog="UserExit" Control="Finish" Event="DoAction" Value="TelemetryLogInstallCancel">NOT Installed</Publish>
|
|
<Publish Dialog="FatalError" Control="Finish" Event="DoAction" Value="TelemetryLogInstallFail">NOT Installed</Publish>
|
|
<Publish Dialog="UserExit" Control="Finish" Event="DoAction" Value="TelemetryLogUninstallCancel">Installed AND _REMOVE_ALL="Yes"</Publish>
|
|
<Publish Dialog="FatalError" Control="Finish" Event="DoAction" Value="TelemetryLogUninstallFail">Installed AND _REMOVE_ALL="Yes"</Publish>
|
|
<Publish Dialog="UserExit" Control="Finish" Event="DoAction" Value="TelemetryLogRepairCancel">Installed AND NOT (_REMOVE_ALL="Yes")</Publish>
|
|
<Publish Dialog="FatalError" Control="Finish" Event="DoAction" Value="TelemetryLogRepairFail">Installed AND NOT (_REMOVE_ALL="Yes")</Publish>
|
|
</UI>
|
|
|
|
<WixVariable Id="WixUIBannerBmp" Value="$(var.ProjectDir)\Images\banner.png" />
|
|
<WixVariable Id="WixUIDialogBmp" Value="$(var.ProjectDir)\Images\dialog.png" />
|
|
<WixVariable Id="WixUILicenseRtf" Value="$(var.RepoDir)\installer\License.rtf" />
|
|
<Property Id="INSTALLSTARTMENUSHORTCUT" Value="1"/>
|
|
<Property Id="WixShellExecTarget" Value="[#PowerToys_ActionRunner.exe]" />
|
|
|
|
<SetProperty Action="SetDEFAULTBOOTSTRAPPERINSTALLFOLDER" Id="DEFAULTBOOTSTRAPPERINSTALLFOLDER" Value="[$(var.DefaultInstallDir)]PowerToys" Before="SetBOOTSTRAPPERINSTALLFOLDER" Sequence="execute"></SetProperty>
|
|
|
|
<!-- In case we didn't receive a value from the bootstrapper. -->
|
|
<SetProperty Action="SetBOOTSTRAPPERINSTALLFOLDER" Id="BOOTSTRAPPERINSTALLFOLDER" Value="[DEFAULTBOOTSTRAPPERINSTALLFOLDER]" Before="DetectPrevInstallPath" Sequence="execute">
|
|
<![CDATA[BOOTSTRAPPERINSTALLFOLDER = ""]]>
|
|
</SetProperty>
|
|
<!-- Have to compare value sent by bootstrapper to default to avoid using it, as a check to verify it's not default. This hack can be removed if it's possible to set the bootstrapper option to the previous install folder-->
|
|
<SetProperty Action="SetINSTALLFOLDERTOPREVIOUSINSTALLFOLDER" Id="INSTALLFOLDER" Value="[PREVIOUSINSTALLFOLDER]" After="DetectPrevInstallPath" Sequence="execute">
|
|
<![CDATA[BOOTSTRAPPERINSTALLFOLDER = DEFAULTBOOTSTRAPPERINSTALLFOLDER AND PREVIOUSINSTALLFOLDER <> ""]]>
|
|
</SetProperty>
|
|
<SetProperty Action="SetINSTALLFOLDERTOBOOTSTRAPPERINSTALLFOLDER" Id="INSTALLFOLDER" Value="[BOOTSTRAPPERINSTALLFOLDER]" After="DetectPrevInstallPath" Sequence="execute">
|
|
<![CDATA[BOOTSTRAPPERINSTALLFOLDER <> DEFAULTBOOTSTRAPPERINSTALLFOLDER OR PREVIOUSINSTALLFOLDER = ""]]>
|
|
</SetProperty>
|
|
|
|
<SetProperty Id="InstallScope" Value="$(var.InstallScope)" Before="DetectPrevInstallPath" Sequence="execute"></SetProperty>
|
|
<InstallExecuteSequence>
|
|
<Custom Action="DetectPrevInstallPath" After="AppSearch" />
|
|
<Custom Action="SetLaunchPowerToysParam" Before="LaunchPowerToys" />
|
|
<Custom Action="SetInstallCmdPalPackageParam" Before="InstallCmdPalPackage" />
|
|
<Custom Action="SetUninstallCommandNotFoundParam" Before="UninstallCommandNotFound" />
|
|
<Custom Action="SetUpgradeCommandNotFoundParam" Before="UpgradeCommandNotFound" />
|
|
<Custom Action="SetApplyModulesRegistryChangeSetsParam" Before="ApplyModulesRegistryChangeSets" />
|
|
|
|
<?if $(var.PerUser) = "true" ?>
|
|
<Custom Action="SetInstallDSCModuleParam" Before="InstallDSCModule" />
|
|
<?endif?>
|
|
|
|
<Custom Action="SetUnApplyModulesRegistryChangeSetsParam" Before="UnApplyModulesRegistryChangeSets" />
|
|
<Custom Action="CheckGPO" After="InstallInitialize">
|
|
NOT Installed
|
|
</Custom>
|
|
<Custom Action="ApplyModulesRegistryChangeSets" After="InstallFiles">
|
|
NOT Installed
|
|
</Custom>
|
|
<Custom Action="InstallCmdPalPackage" After="InstallFiles">
|
|
NOT Installed
|
|
</Custom>
|
|
<Custom Action="WixCloseApplications" Before="RemoveFiles" />
|
|
<Custom Action="RemovePowerToysSchTasks" After="RemoveFiles" />
|
|
<!-- TODO: Use to activate embedded MSIX -->
|
|
<!--<Custom Action="InstallEmbeddedMSIXTask" After="InstallFinalize">
|
|
NOT Installed
|
|
</Custom>-->
|
|
<?if $(var.PerUser) = "true" ?>
|
|
<Custom Action="InstallDSCModule" After="InstallFiles"/>
|
|
<?endif?>
|
|
<Custom Action="TelemetryLogInstallSuccess" After="InstallFinalize">
|
|
NOT Installed
|
|
</Custom>
|
|
<Custom Action="TelemetryLogUninstallSuccess" After="InstallFinalize">
|
|
Installed and (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
|
|
</Custom>
|
|
<Custom Action="UnApplyModulesRegistryChangeSets" Before="RemoveFiles">
|
|
Installed AND (REMOVE="ALL")
|
|
</Custom>
|
|
<Custom Action="UnRegisterContextMenuPackages" Before="RemoveFiles">
|
|
Installed AND (REMOVE="ALL")
|
|
</Custom>
|
|
<Custom Action="CleanImageResizerRuntimeRegistry" Before="RemoveFiles">
|
|
Installed AND (REMOVE="ALL")
|
|
</Custom>
|
|
<Custom Action="CleanFileLocksmithRuntimeRegistry" Before="RemoveFiles">
|
|
Installed AND (REMOVE="ALL")
|
|
</Custom>
|
|
<Custom Action="CleanPowerRenameRuntimeRegistry" Before="RemoveFiles">
|
|
Installed AND (REMOVE="ALL")
|
|
</Custom>
|
|
<Custom Action="CleanNewPlusRuntimeRegistry" Before="RemoveFiles">
|
|
Installed AND (REMOVE="ALL")
|
|
</Custom>
|
|
<Custom Action="UnRegisterCmdPalPackage" Before="RemoveFiles">
|
|
Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
|
|
</Custom>
|
|
<Custom Action="UnsetAdvancedPasteAPIKey" Before="RemoveFiles">
|
|
Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
|
|
</Custom>
|
|
<Custom Action="UninstallCommandNotFound" Before="RemoveFiles">
|
|
Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
|
|
</Custom>
|
|
<Custom Action="UpgradeCommandNotFound" After="InstallFiles">
|
|
WIX_UPGRADE_DETECTED
|
|
</Custom>
|
|
<Custom Action="UninstallServicesTask" After="InstallFinalize">
|
|
Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
|
|
</Custom>
|
|
<!-- TODO: Use to activate embedded MSIX -->
|
|
<!--<Custom Action="UninstallEmbeddedMSIXTask" After="InstallFinalize">
|
|
Installed AND (REMOVE="ALL")
|
|
</Custom>-->
|
|
<?if $(var.PerUser) = "true" ?>
|
|
<Custom Action="UninstallDSCModule" After="InstallFinalize">
|
|
Installed AND (REMOVE="ALL")
|
|
</Custom>
|
|
<?endif?>
|
|
<Custom Action="TerminateProcesses" Before="InstallValidate" />
|
|
<Custom Action="LaunchPowerToys" Before="InstallFinalize">NOT Installed</Custom>
|
|
|
|
<!-- Clean Video Conference Mute registry keys that might be around from previous installations. We've deprecated this utility since then. -->
|
|
<Custom Action="CleanVideoConferenceRegistry" Before="InstallFinalize">NOT Installed</Custom>
|
|
|
|
</InstallExecuteSequence>
|
|
|
|
<CustomAction Id="SetLaunchPowerToysParam"
|
|
Property="LaunchPowerToys"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="SetInstallCmdPalPackageParam"
|
|
Property="InstallCmdPalPackage"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction
|
|
Id="LaunchPowerToys"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="LaunchPowerToysCA"
|
|
/>
|
|
|
|
<CustomAction
|
|
Id="TerminateProcesses"
|
|
Return="ignore"
|
|
Execute="immediate"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="TerminateProcessesCA" />
|
|
|
|
<CustomAction Id="SetApplyModulesRegistryChangeSetsParam"
|
|
Property="ApplyModulesRegistryChangeSets"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="SetUnApplyModulesRegistryChangeSetsParam"
|
|
Property="UnApplyModulesRegistryChangeSets"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="SetInstallDSCModuleParam"
|
|
Property="InstallDSCModule"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="SetUninstallCommandNotFoundParam"
|
|
Property="UninstallCommandNotFound"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="SetUpgradeCommandNotFoundParam"
|
|
Property="UpgradeCommandNotFound"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="SetCreateWinAppSDKHardlinksParam"
|
|
Property="CreateWinAppSDKHardlinks"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="SetDeleteWinAppSDKHardlinksParam"
|
|
Property="DeleteWinAppSDKHardlinks"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="SetCreatePTInteropHardlinksParam"
|
|
Property="CreatePTInteropHardlinks"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="SetDeletePTInteropHardlinksParam"
|
|
Property="DeletePTInteropHardlinks"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="SetCreateDotnetRuntimeHardlinksParam"
|
|
Property="CreateDotnetRuntimeHardlinks"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="SetDeleteDotnetRuntimeHardlinksParam"
|
|
Property="DeleteDotnetRuntimeHardlinks"
|
|
Value="[INSTALLFOLDER]" />
|
|
|
|
<CustomAction Id="RemovePowerToysSchTasks"
|
|
Return="ignore"
|
|
Impersonate="no"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="RemoveScheduledTasksCA"
|
|
/>
|
|
|
|
<CustomAction Id="InstallEmbeddedMSIXTask"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="InstallEmbeddedMSIXCA"
|
|
/>
|
|
|
|
<CustomAction Id="UninstallEmbeddedMSIXTask"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="UninstallEmbeddedMSIXCA"
|
|
/>
|
|
|
|
<CustomAction Id="InstallDSCModule"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="InstallDSCModuleCA"
|
|
/>
|
|
|
|
<CustomAction Id="UninstallDSCModule"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="UninstallDSCModuleCA"
|
|
/>
|
|
|
|
<CustomAction Id="UninstallServicesTask"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="UninstallServicesCA"
|
|
/>
|
|
|
|
<CustomAction Id="UninstallCommandNotFound"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="UninstallCommandNotFoundModuleCA"
|
|
/>
|
|
|
|
<CustomAction Id="UpgradeCommandNotFound"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="UpgradeCommandNotFoundModuleCA"
|
|
/>
|
|
|
|
<CustomAction Id="UnsetAdvancedPasteAPIKey"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="UnsetAdvancedPasteAPIKeyCA"
|
|
/>
|
|
|
|
<CustomAction Id="TelemetryLogInstallSuccess"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="TelemetryLogInstallSuccessCA"
|
|
/>
|
|
|
|
<CustomAction Id="TelemetryLogInstallCancel"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="TelemetryLogInstallCancelCA"
|
|
/>
|
|
|
|
<CustomAction Id="TelemetryLogInstallFail"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="TelemetryLogInstallFailCA"
|
|
/>
|
|
|
|
<CustomAction Id="TelemetryLogUninstallSuccess"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="TelemetryLogUninstallSuccessCA"
|
|
/>
|
|
|
|
<CustomAction Id="TelemetryLogUninstallCancel"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="TelemetryLogUninstallCancelCA"
|
|
/>
|
|
|
|
<CustomAction Id="TelemetryLogUninstallFail"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="TelemetryLogUninstallFailCA"
|
|
/>
|
|
|
|
<CustomAction Id="TelemetryLogRepairCancel"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="TelemetryLogRepairCancelCA"
|
|
/>
|
|
|
|
<CustomAction Id="TelemetryLogRepairFail"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="TelemetryLogRepairFailCA"
|
|
/>
|
|
|
|
<CustomAction Id="DetectPrevInstallPath"
|
|
Return="check"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="DetectPrevInstallPathCA"
|
|
/>
|
|
|
|
<CustomAction Id="CleanVideoConferenceRegistry"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="CleanVideoConferenceRegistryCA"
|
|
/>
|
|
|
|
<CustomAction Id="ApplyModulesRegistryChangeSets"
|
|
Return="check"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="ApplyModulesRegistryChangeSetsCA"
|
|
/>
|
|
|
|
<CustomAction Id="UnApplyModulesRegistryChangeSets"
|
|
Return="check"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="UnApplyModulesRegistryChangeSetsCA"
|
|
/>
|
|
|
|
<CustomAction Id="UnRegisterContextMenuPackages"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="UnRegisterContextMenuPackagesCA"
|
|
/>
|
|
|
|
<CustomAction Id="CleanImageResizerRuntimeRegistry"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="CleanImageResizerRuntimeRegistryCA"
|
|
/>
|
|
<CustomAction Id="CleanFileLocksmithRuntimeRegistry"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="CleanFileLocksmithRuntimeRegistryCA"
|
|
/>
|
|
<CustomAction Id="CleanPowerRenameRuntimeRegistry"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="CleanPowerRenameRuntimeRegistryCA"
|
|
/>
|
|
<CustomAction Id="CleanNewPlusRuntimeRegistry"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="CleanNewPlusRuntimeRegistryCA"
|
|
/>
|
|
|
|
<CustomAction Id="UnRegisterCmdPalPackage"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="UnRegisterCmdPalPackageCA"
|
|
/>
|
|
|
|
<CustomAction Id="CheckGPO"
|
|
Return="check"
|
|
Impersonate="yes"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="CheckGPOCA"
|
|
/>
|
|
|
|
<CustomAction Id="InstallCmdPalPackage"
|
|
Return="ignore"
|
|
Impersonate="yes"
|
|
Execute="deferred"
|
|
BinaryKey="PTCustomActions"
|
|
DllEntry="InstallCmdPalPackageCA"
|
|
/>
|
|
|
|
<!-- Close 'PowerToys.exe' before uninstall-->
|
|
<Property Id="MSIRESTARTMANAGERCONTROL" Value="DisableShutdown" />
|
|
<Property Id="MSIFASTINSTALL" Value="DisableShutdown" />
|
|
<util:CloseApplication CloseMessage="yes" Target="PowerToys.exe" ElevatedCloseMessage="yes" RebootPrompt="no" TerminateProcess="0" />
|
|
</Product>
|
|
|
|
<Fragment>
|
|
<Binary Id="PTCustomActions" SourceFile="$(var.PowerToysSetupCustomActions.TargetPath)" />
|
|
</Fragment>
|
|
|
|
<!-- Installation directory structure -->
|
|
<Fragment>
|
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
|
<Directory Id="$(var.DefaultInstallDir)">
|
|
<Directory Id="INSTALLFOLDER" Name="PowerToys">
|
|
<Directory Id="BaseApplicationsAssetsFolder" Name="Assets">
|
|
</Directory>
|
|
<Directory Id="DSCModulesReferenceFolder" Name="DSCModules" />
|
|
<Directory Id="WinUI3AppsInstallFolder" Name="WinUI3Apps">
|
|
<Directory Id="WinUI3AppsMicrosoftUIXamlInstallFolder" Name="Microsoft.UI.Xaml">
|
|
<Directory Id="WinUI3AppsMicrosoftUIXamlAssetsInstallFolder" Name="Assets" />
|
|
</Directory>
|
|
<Directory Id="WinUI3AppsAssetsFolder" Name="Assets">
|
|
</Directory>
|
|
</Directory>
|
|
<Directory Id="ToolsFolder" Name="Tools"/>
|
|
</Directory>
|
|
</Directory>
|
|
<Directory Id="ProgramMenuFolder">
|
|
<Directory Id="ApplicationProgramsFolder" Name="PowerToys (Preview)"/>
|
|
</Directory>
|
|
<Directory Id="DesktopFolder" Name="Desktop" />
|
|
</Directory>
|
|
</Fragment>
|
|
</Wix>
|