PowerToys/installer/PowerToysSetup/Product.wxs
Randy 81c09685e9
Registry Preview: complete feature with integration with Settings and the Launcher UX (#23709)
* Initial src for Registry Preview

Initial collection of files

* Update MainWindow.Utilities.cs

fixing a few spelling items

* Update expect.txt

* Update App.xaml.cs

* Update MainWindow.Events.cs

* Update MainWindow.Utilities.cs

* Update MainWindow.xaml.cs

* Update expect.txt

* Update MainWindow.Events.cs

* Rename AddPreviewtoRegfile.reg to AddPreviewToRegfile.reg

* Rename RemovePreviewtoRegfile.reg to RemovePreviewToRegfile.reg

* Update Resources.resw

* Update MainWindow.xaml

* Turns on self-contained mode

Updates the csproj file to compile the app as self-contained .
Includes fixes for code that expected the app to be in an ApplicationContainer.
Updates WindowsAppSDK from 1.1.5 to 1.2.230118.102.

* Updated to align with StyleCop errors

Multiple changes across the codebase that now aligns with StyleCop guidelines.

Tested again after the changes, to make sure no new bugs crept in.

* Added comments for spell-checker

Unclear if this side step should be done or not, but the kxz comes from a GUID and the other three names are constants.

* Adding code-custom.dic

Comments didn't work; trying a dic file

* Added four new terms to expects.txt file

Cleaning up attempt to update the spell-checker with dic file and moved it to expects.txt file

* Adding one more string

Adding one more string for Spell-Check

* Adding back egfile

Seems this is needed.

* Correcting a variable name

Seems one of the variable names that changed globally got missed in a XAML file.

* Update project to be more PowerToys friendly

Tweaking names and output file name to fit better with PowerToys.

* First pass at integration into Settings and Launcher

This PR is not as large as it seems:
- RegistryPreview's source moved around to a "better" directory that makes it look like the whole app changed.  It didn't.  In fact, I opened it in Beyond Compare and there's not much difference in the RegistryPreview app.
- Added RegistryPreviewExt that produces a DLL that the Launcher can run the EXE
- Changes to Runner calls the Ext DLL rather than the app
- Settings UI got a bunch of changes to enable the Settings page for enable/disable across ViewModels, Views, and string tables.

Still todo:
- Add "Preview" to .REG files, when the app is enable (and remove it when disabled)
- Update the thumbnail-screenshot in the Settings page
- Add support for OOBE

* Update expect.txt

Added REGISTRYPREVIEWEXT for recent changes and corrected an alphabetic sorting error.

* Updating project file for Release mode

Build failed due to a bad Includes path in Release mode.

* Adds REG registration but breaks settings

This update will update the HKCU branch of the Registry for REG files: if the app in PowerToys is enabled, it adds a Preview item to the context menu of REG files and disabling in PowerToys removes the menu item.

While working on this, I noticed that the application settings were broken, after moving to a self-contained EXE: there must have been old settings from past builds, when it was still using containers and family names.

Added TODO's to add a new way to save settings, likely as JSON.

* Re-enabled app settings

Moved from using ApplicationDataContainer for app settings and now use simple JSON.

Also cleaned up handling the scenario where the Launcher send in the PID from PowerToys' main thread.

Fixed past spelling errors as well.

* Update RegistryPreview.png

Captured new screenshot.

* Integration into OOBE

Integrates new page for Registry Preview into OOBE process.

* Removing old comment and unneeded calls

Two bits of source removed as they aren't needed any longer

Removing a chunk of old commented out code that doesn't make sense anymore.

* Merging file from upstream

Updating some files due to three merge conflicts from upstream changes and a couple of other changes to keep up.

* Update .gitignore

Adding two vcxproj files that have local updates for atls.lib locations.

* Update Resources.resw

Fixing a typo that involved a missing closing tag.

* Fix analyzer warnings

* Fix CI build

* Fix ARM64 build
Project file cleanup

* Add to installer

* expect.txt

* Remove unneeded dll

* Update MainWindow.xaml.cs

Added check for current Theme and adjust TextBox Foreground accordingly.

* Update expect.txt

Cleaning up merge cruft.

* Revert wrong .gitignore changes

* Fix ARM installer

* Update Brushes for textBox to use Theme based versions

Finally figured out how to use the built-in, Theme-aware Brushes for the font colors in the onscreen textBox.  Also have it aligning the font color for the hover state.

* Align configuration in PowerToys.sln

* [installer] Add missing files

* Fix bad merge

* Fixes for stefansjfw's review

Includes:
- two new strings for UX localization
- adds compatibility section for Windows 10
- fix to only track successful activations
- Removes two REG files that were there for examples

* Fixes from review from htcfreek

Updates:
- Fixed an issue where TextBox_TextChanged was firing when you simply opened a file.
- Added clamp to prevent files larger than 10MB from being opened.
- Added support in the UX to show Keys and Values that are deleted via the file
- Added support to specially handle Keys that start with - and Values that have =- in them (delete scenario)
- Changed AppBarButton icon for Edit from Rename to NewWindow

* Create deleted-folder32.png

* Added Registry Preview to GPO

* Update expect.txt

Updating spellchecker works

* Updating Size/Move code for better results

- Moved the size/move to the MainWindow layer
- Cleaned up the JSON settings handling to avoid an access denied on first run

* Improving text handling

Changed how special characters are parse, which helps with live entry.

* Updates to parsing and other fixes

- Renamed the value PNG for parity
- Added new error image
- Added check that values have " at start and finish.
- Added support for a new "ERROR" type for Values
- Fixed support for @ versus "@" in values
- Fixed bug where Save wasn't activating in all scernarios

* Fix signing and versioning

* Update src/settings-ui/Settings.UI/ViewModels/RegistryPreviewViewModel.cs

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Apply suggestions from code review

Adds Launch button to the settings page.

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Update Resources.resw

Adding strings for new launch button

* Adding new version for GPO

Moving to 0.69.0

* More parsing bug fixes

- Changes to look for [- instead of -[ for syntax deleting keys (fix for developer's mental hiccup)
- Moved [- to top of the decision making stack, as it needs to come before [
- Added new StripEscapedCharacters function for both sides of a Value line
- Fixed crashing bug for scenario where no Keys are parsed before a Value

* Bug fixes from most recent review.

- Dictionary will now be case insensitive when searching for keys
- Added tool tips (and strings) to the images of the Keys and Values
- Updated delete handling for Keys, so that only the leaf-most node gets marked as deleted; also stops the top most roots from being marked deleted.

* Tweaking for @=-

Forces the UX to take @=- and treat it as @="" since that's what Registry Editor would do.

* Removing unused usings

* Updates app description

* Update src/gpo/assets/PowerToys.admx

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* cleanup proj file
launch process only if module is enabled
add process to bugreport process list

* Add context menu icon

* Update src/modules/registrypreview/RegistryPreviewUI/MainWindow.Utilities.cs

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Use modulesRegistry.h to apply/unapply registry changes

* Tweaked window settings

Moved the loading of the settings a little later in the initialization code, which gives more time for things to initialize.

* Update registry.h

Moving the definition out of the detail namespace to the registry name space to fix a compilation issue in RegistryPreviewExt.

* Unapply on creation

If module is disabled in settings.json, on startup reg entries should be unnaplied.
TODO: read m_enabled from settings file on creation

* Removing size/move main window

Added a TODO comment that responds to the size/position settings that are being saved out in the JSON blob on close as it doesn't always work on every PC, as the MainWindow initializes at different times.

* Change to always keep Save As active

No reason for this to be disabled, honestly.

---------

Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
2023-03-27 15:21:46 +02:00

615 lines
29 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="42B84BF7-5FBF-473B-9C8B-049DC16F7708">
<Package InstallerVersion="500" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" Platform="$(var.PlatformLK)" />
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed." />
<Upgrade Id="42B84BF7-5FBF-473B-9C8B-049DC16F7708">
<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 the Shortcut Guide and Fancy Zones features.">
<ComponentGroupRef Id="CoreComponents" />
<ComponentGroupRef Id="AlwaysOnTopComponentGroup" />
<ComponentGroupRef Id="AwakeComponentGroup" />
<ComponentGroupRef Id="ColorPickerComponentGroup" />
<ComponentGroupRef Id="FancyZonesComponentGroup" />
<ComponentGroupRef Id="FileExplorerPreviewComponentGroup" />
<ComponentGroupRef Id="FileLocksmithComponentGroup" />
<ComponentGroupRef Id="HostsComponentGroup" />
<ComponentGroupRef Id="ImageResizerComponentGroup" />
<ComponentGroupRef Id="KeyboardManagerComponentGroup" />
<ComponentGroupRef Id="MeasureToolComponentGroup" />
<ComponentGroupRef Id="MouseUtilsComponentGroup" />
<ComponentGroupRef Id="PastePlainComponentGroup" />
<ComponentGroupRef Id="PowerAccentComponentGroup" />
<ComponentGroupRef Id="PowerRenameComponentGroup" />
<ComponentGroupRef Id="RegistryPreviewComponentGroup" />
<ComponentGroupRef Id="RunComponentGroup" />
<ComponentGroupRef Id="SettingsComponentGroup" />
<ComponentGroupRef Id="ShortcutGuideComponentGroup" />
<ComponentGroupRef Id="TextExtractorComponentGroup" />
<ComponentGroupRef Id="VideoConferenceComponentGroup" />
<ComponentGroupRef Id="ResourcesComponentGroup" />
<ComponentGroupRef Id="WindowsAppSDKComponentGroup" />
<ComponentGroupRef Id="ToolComponentGroup" />
<ComponentGroupRef Id="MonacoSRCHeatGenerated" />
</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="CREATESCHEDULEDTASK" Value="1"/>
<Property Id="WixShellExecTarget" Value="[#PowerToys_ActionRunner.exe]" />
<SetProperty Action="SetDEFAULTBOOTSTRAPPERINSTALLFOLDER" Id="DEFAULTBOOTSTRAPPERINSTALLFOLDER" Value="[ProgramFiles64Folder]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>
<InstallExecuteSequence>
<Custom Action="DetectPrevInstallPath" After="AppSearch" />
<Custom Action="SetRegisterPowerToysSchTaskParam" Before="RegisterPowerToysSchTask" />
<Custom Action="SetApplyModulesRegistryChangeSetsParam" Before="ApplyModulesRegistryChangeSets" />
<Custom Action="SetUnApplyModulesRegistryChangeSetsParam" Before="UnApplyModulesRegistryChangeSets" />
<Custom Action="SetCreateWinAppSDKHardlinksParam" Before="CreateWinAppSDKHardlinks" />
<Custom Action="SetDeleteWinAppSDKHardlinksParam" Before="DeleteWinAppSDKHardlinks" />
<Custom Action="SetCreatePTInteropHardlinksParam" Before="CreatePTInteropHardlinks" />
<Custom Action="SetDeletePTInteropHardlinksParam" Before="DeletePTInteropHardlinks" />
<Custom Action="SetCreateDotnetRuntimeHardlinksParam" Before="CreateDotnetRuntimeHardlinks" />
<Custom Action="SetDeleteDotnetRuntimeHardlinksParam" Before="DeleteDotnetRuntimeHardlinks" />
<Custom Action="RegisterPowerToysSchTask" After="InstallFiles">
NOT Installed and CREATESCHEDULEDTASK = 1
</Custom>
<Custom Action="ApplyModulesRegistryChangeSets" After="InstallFiles">
NOT Installed
</Custom>
<Custom Action="CreateWinAppSDKHardlinks" After="InstallFiles">
NOT Installed
</Custom>
<Custom Action="CreatePTInteropHardlinks" After="InstallFiles">
NOT Installed
</Custom>
<Custom Action="CreateDotnetRuntimeHardlinks" 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>-->
<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="DeleteWinAppSDKHardlinks" Before="RemoveFiles">
Installed AND (REMOVE="ALL")
</Custom>
<Custom Action="DeletePTInteropHardlinks" After="InstallInitialize" />
<Custom Action="DeleteDotnetRuntimeHardlinks" Before="RemoveFiles">
Installed AND (REMOVE="ALL")
</Custom>
<!-- TODO: Use to activate embedded MSIX -->
<!--<Custom Action="UninstallEmbeddedMSIXTask" After="InstallFinalize">
Installed AND (REMOVE="ALL")
</Custom>-->
<Custom Action="TerminateProcesses" Before="InstallValidate" />
<Custom Action="LaunchPowerToys" After="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>
<CustomAction
Id="LaunchPowerToys"
Execute="immediate"
Impersonate="yes"
Return="asyncNoWait"
FileKey="PowerToys.exe"
ExeCommand="--dont-elevate" />
<CustomAction
Id="TerminateProcesses"
Return="ignore"
Execute="immediate"
BinaryKey="PTCustomActions"
DllEntry="TerminateProcessesCA" />
<CustomAction Id="SetRegisterPowerToysSchTaskParam"
Property="RegisterPowerToysSchTask"
Value="[INSTALLFOLDER]PowerToys.exe" />
<CustomAction Id="SetApplyModulesRegistryChangeSetsParam"
Property="ApplyModulesRegistryChangeSets"
Value="[INSTALLFOLDER]" />
<CustomAction Id="SetUnApplyModulesRegistryChangeSetsParam"
Property="UnApplyModulesRegistryChangeSets"
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]" />
<!-- Needs to Impersonate="no" and Execute="deferred" in order to run elevated. -->
<CustomAction Id="RegisterPowerToysSchTask"
Return="ignore"
Impersonate="no"
Execute="deferred"
BinaryKey="PTCustomActions"
DllEntry="CreateScheduledTaskCA"
/>
<CustomAction Id="DeleteWinAppSDKHardlinks"
Return="ignore"
Impersonate="no"
Execute="deferred"
BinaryKey="PTCustomActions"
DllEntry="DeleteWinAppSDKHardlinksCA"
/>
<CustomAction Id="CreateWinAppSDKHardlinks"
Return="ignore"
Impersonate="no"
Execute="deferred"
BinaryKey="PTCustomActions"
DllEntry="CreateWinAppSDKHardlinksCA"
/>
<CustomAction Id="DeletePTInteropHardlinks"
Return="ignore"
Impersonate="no"
Execute="deferred"
BinaryKey="PTCustomActions"
DllEntry="DeletePTInteropHardlinksCA"
/>
<CustomAction Id="CreatePTInteropHardlinks"
Return="ignore"
Impersonate="no"
Execute="deferred"
BinaryKey="PTCustomActions"
DllEntry="CreatePTInteropHardlinksCA"
/>
<CustomAction Id="DeleteDotnetRuntimeHardlinks"
Impersonate="no"
Execute="deferred"
BinaryKey="PTCustomActions"
DllEntry="DeleteDotnetRuntimeHardlinksCA"
/>
<CustomAction Id="CreateDotnetRuntimeHardlinks"
Impersonate="no"
Execute="deferred"
BinaryKey="PTCustomActions"
DllEntry="CreateDotnetRuntimeHardlinksCA"
/>
<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="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="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"
/>
<!-- 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="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER" Name="PowerToys">
<Directory Id="DllsFolder" Name="dll">
<Directory Id="DotnetDlls" Name="dotnet" />
<Directory Id="WinAppSDKDlls" Name="WinAppSDK" />
<Directory Id="PowerToysInteropDlls" Name="Interop" />
</Directory>
<Directory Id="ToolsFolder" Name="Tools"/>
<Directory Id="ModulesInstallFolder" Name="modules">
<Directory Id="ImageResizerInstallFolder" Name="$(var.ImageResizerProjectName)">
<Directory Id="ImageResizerAssetsFolder" Name="Assets" />
</Directory>
<Directory Id="PowerAccentInstallFolder" Name="$(var.PowerAccentProjectName)">
</Directory>
<Directory Id="FileLocksmithInstallFolder" Name="$(var.FileLocksmithProjectName)">
<Directory Id="FileLocksmithAssetsInstallFolder" Name="Assets" />
</Directory>
<Directory Id="PowerRenameInstallFolder" Name="$(var.PowerRenameProjectName)">
<Directory Id="PowerRenameAssetsFolder" Name="Assets" />
<Directory Id="PowerRenameMicrosoftUIXamlInstallFolder" Name="Microsoft.UI.Xaml">
<Directory Id="PowerRenameMicrosoftUIXamlAssetsInstallFolder" Name="Assets" />
</Directory>
</Directory>
<Directory Id="ShortcutGuideInstallFolder" Name="ShortcutGuide">
<Directory Id="ShortcutGuideExecutableInstallFolder" Name="ShortcutGuide">
<Directory Id="ShortcutGuideSvgsInstallFolder" Name="svgs"/>
</Directory>
<Directory Id="ShortcutGuideModuleInterfaceInstallFolder" Name="ShortcutGuideModuleInterface"/>
</Directory>
<Directory Id="VideoConferenceInstallFolder" Name="$(var.VideoConferenceProjectName)">
<Directory Id="VideoConferenceIconsFolder" Name="Icons" />
</Directory>
<Directory Id="FileExplorerPreviewInstallFolder" Name="FileExplorerPreview">
<Directory Id="MonacoPreviewHandlerMonacoCustomLanguagesFolder" Name="customLanguages" />
<Directory Id="MonacoPreviewHandlerMonacoSRCFolder" Name="monacoSRC" />
</Directory>
<Directory Id="FancyZonesInstallFolder" Name="$(var.FancyZonesProjectName)" />
<Directory Id="PowerOCRInstallFolder" Name="$(var.PowerOCRProjectName)" />
<Directory Id="AwakeInstallFolder" Name="$(var.AwakeProjectName)">
<Directory Id="AwakeImagesFolder" Name="Images" />
</Directory>
<!-- KBM -->
<Directory Id="KeyboardManagerInstallFolder" Name="$(var.KeyboardManagerProjectName)">
<Directory Id="KeyboardManagerEditorInstallFolder" Name="KeyboardManagerEditor" />
<Directory Id="KeyboardManagerEngineInstallFolder" Name="KeyboardManagerEngine" />
</Directory>
<!-- Color Picker -->
<Directory Id="ColorPickerInstallFolder" Name="$(var.ColorPickerProjectName)">
<Directory Id="ColorPickerResourcesFolder" Name="Resources"/>
</Directory>
<!-- Mouse Utils -->
<Directory Id="MouseUtilsInstallFolder" Name="$(var.MouseUtilsProjectName)">
<Directory Id="MouseJumpUIFolder" Name="MouseJumpUI" />
</Directory>
<!-- PastePlain -->
<Directory Id="PastePlainInstallFolder" Name="$(var.PastePlainProjectName)">
</Directory>
<!-- RegistryPreview -->
<Directory Id="RegistryPreviewInstallFolder" Name="$(var.RegistryPreviewProjectName)">
<Directory Id="RegistryPreviewAssetsInstallFolder" Name="Assets" />
</Directory>
<!-- AlwaysOnTop -->
<Directory Id="AlwaysOnTopInstallFolder" Name="$(var.AlwaysOnTopProjectName)">
</Directory>
<!-- MeasureTool -->
<Directory Id="MeasureToolInstallFolder" Name="$(var.MeasureToolProjectName)">
<Directory Id="MeasureToolMicrosoftUIXamlInstallFolder" Name="Microsoft.UI.Xaml">
<Directory Id="MeasureToolMicrosoftUIXamlAssetsInstallFolder" Name="Assets" />
</Directory>
</Directory>
<!-- Hosts -->
<Directory Id="HostsInstallFolder" Name="$(var.HostsProjectName)">
<Directory Id="HostsAssetsFolder" Name="Assets" />
<Directory Id="HostsMicrosoftUIXamlInstallFolder" Name="Microsoft.UI.Xaml">
<Directory Id="HostsMicrosoftUIXamlAssetsInstallFolder" Name="Assets" />
</Directory>
</Directory>
<!-- Launcher -->
<Directory Id="LauncherInstallFolder" Name="launcher">
<Directory Id="LauncherImagesFolder" Name="Images" />
<Directory Id="LauncherPropertiesFolder" Name="Properties" />
<!-- Plugins -->
<Directory Id="LauncherPluginsFolder" Name="Plugins">
<Directory Id="WebSearchPluginFolder" Name="WebSearch">
<Directory Id="WebSearchImagesFolder" Name="Images" />
<Directory Id="WebSearchLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="CalculatorPluginFolder" Name="Calculator">
<Directory Id="CalculatorImagesFolder" Name="Images" />
<Directory Id="CalculatorLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="FolderPluginFolder" Name="Folder">
<Directory Id="FolderPluginImagesFolder" Name="Images" />
<Directory Id="FolderPluginLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="ProgramPluginFolder" Name="Program">
<Directory Id="ProgramImagesFolder" Name="Images" />
<Directory Id="ProgramLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="ShellPluginFolder" Name="Shell">
<Directory Id="ShellImagesFolder" Name="Images" />
<Directory Id="ShellLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="IndexerPluginFolder" Name="Indexer">
<Directory Id="IndexerImagesFolder" Name="Images" />
<Directory Id="IndexerLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="UriPluginFolder" Name="Uri">
<Directory Id="UriImagesFolder" Name="Images" />
<Directory Id="UriLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="HistoryPluginFolder" Name="History">
<Directory Id="HistoryImagesFolder" Name="Images" />
<Directory Id="HistoryLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="UnitConverterPluginFolder" Name="UnitConverter">
<Directory Id="UnitConverterImagesFolder" Name="Images" />
<Directory Id="UnitConverterLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="VSCodeWorkspacesPluginFolder" Name="VSCodeWorkspace">
<Directory Id="VSCodeWorkspaceImagesFolder" Name="Images" />
<Directory Id="VSCodeWorkspaceLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="WindowWalkerPluginFolder" Name="WindowWalker">
<Directory Id="WindowWalkerImagesFolder" Name="Images" />
<Directory Id="WindowWalkerLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="OneNotePluginFolder" Name="OneNote">
<Directory Id="OneNoteImagesFolder" Name="Images" />
<Directory Id="OneNoteLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="RegistryPluginFolder" Name="Registry">
<Directory Id="RegistryImagesFolder" Name="Images" />
<Directory Id="RegistryLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="ServicePluginFolder" Name="Service">
<Directory Id="ServiceImagesFolder" Name="Images" />
</Directory>
<Directory Id="WindowsTerminalPluginFolder" Name="WindowsTerminal">
<Directory Id="WindowsTerminalImagesFolder" Name="Images" />
<Directory Id="WindowsTerminalLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="SystemPluginFolder" Name="System">
<Directory Id="SystemImagesFolder" Name="Images" />
</Directory>
<Directory Id="TimeDatePluginFolder" Name="TimeDate">
<Directory Id="TimeDateImagesFolder" Name="Images" />
<Directory Id="TimeDateLanguagesFolder" Name="Languages" />
</Directory>
<Directory Id="WindowsSettingsPluginFolder" Name="WindowsSettings">
<Directory Id="WindowsSettingsImagesFolder" Name="Images" />
<Directory Id="WindowsSettingsLanguagesFolder" Name="Languages" />
</Directory>
</Directory>
</Directory>
</Directory>
<!-- Settings -->
<Directory Id="SettingsV2InstallFolder" Name="Settings">
<Directory Id="SettingsV2AssetsInstallFolder" Name="Assets">
<Directory Id="SettingsV2OOBEAssetsFluentIconsInstallFolder" Name="FluentIcons" />
<Directory Id="SettingsV2AssetsModulesInstallFolder" Name="Modules" >
<Directory Id="SettingsV2OOBEAssetsModulesInstallFolder" Name="OOBE" />
</Directory>
</Directory>
<Directory Id="SettingsV2MicrosoftUIXamlInstallFolder" Name="Microsoft.UI.Xaml">
<Directory Id="SettingsV2MicrosoftUIXamlAssetsInstallFolder" Name="Assets" />
</Directory>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="PowerToys (Preview)"/>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
</Directory>
</Fragment>
</Wix>