CmdPal: Add "Uninstall Application" command (#41302)

<!-- 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
Added the ability to uninstall UWP apps directly from the Command
Palette (similar to the current Windows Start menu). For Win32
applications, the Windows Settings uninstall page is opened.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
> Not existing
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
> I messaged this to @michaeljolley in his Twitch chat, and he said it
would be a cool feature. No further discussion has happened so far.
- [x] **Tests:** Added/updated and all pass
> No tests added, unsure which cases to cover
> A run of the existing tests for this Package passed 100%

- [x] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [x] **New binaries:** Added on the required places
> Not required
- [ ] **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
I added a new file, `Commands/UninstallApplicationCommand.cs`, which
implements the logic to uninstall applications directly from the Command
Palette. The command differentiates between UWP apps and Win32 programs.
All common error scenarios are properly handled and logged to ensure
reliability and traceability.

Additionally, in `Icons.cs`, I included the "Delete" icon from the
Windows Start menu to be displayed alongside the uninstall commands in
the Command List, providing a familiar visual cue for users.

The uninstall commands have been integrated into the appropriate classes
for both UWP and Win32 applications, making them fully accessible and
consistent across the Command Palette.
The command can be triggered using the shortcut Ctrl + Shift + Delete
for quick access.

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Tested locally; currently, verification was limited to uninstalling a
UWP application, unsure of additional test scenarios.

*Note: This is my first PR draft, so apologies if I missed anything.*

---------

Co-authored-by: KnauerM <michael.knauer@rheinbahn.de>
This commit is contained in:
Michael Knauer
2025-08-29 16:20:22 +02:00
committed by GitHub
parent 077af2c74b
commit 0c45799bb5
8 changed files with 277 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ APPMODEL
APPNAME
appref
appsettings
appsfeatures
appwindow
appwiz
appxpackage