Files
PowerToys/installer/PowerToysSetupCustomActionsVNext/CustomAction.cpp
Gordon Lam 8516625c4d fix(installer): terminate remaining PowerToys processes during setup (#50106)
## Summary of the Pull Request

Extends `TerminateProcessesCA` in
`installer\PowerToysSetupCustomActionsVNext\CustomAction.cpp` so setup
closes the remaining independently running PowerToys executables before
replacing installed files.

The list now covers Shortcut Guide, both current and legacy Keyboard
Manager editors, Keyboard Manager Engine, the current Mouse Jump WinUI 3
executable, Grab and Move, Quick Accent, Text Extractor, and Screen
Ruler. The legacy `PowerToys.MouseJumpUI.exe` entry remains for upgrade
cleanup.

## PR Checklist

- [ ] **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 — no automated behavior was
added; targeted project build is currently blocked by a missing local
C++/WinRT NuGet props file
- [x] **Localization:** No end-user-facing strings were added or changed

## Detailed Description of the Pull Request / Additional comments

The installer already performs a best-effort graceful close followed by
forced termination for executable names in `processesToTerminate`.
Several shipped out-of-process modules were not represented in that
list, so user-open, orphaned, or unresponsive instances could remain
during upgrade or uninstall and retain handles to installed files.

This change only expands the executable-name array and updates its fixed
size. It does not alter shutdown ordering or termination behavior.

## Validation Steps Performed

- Verified the array contains exactly 54 entries with no duplicates.
- Verified all newly added names against current project outputs,
installer manifests, or module process-launch sites.
- Preserved the legacy Mouse Jump executable name for upgrade cleanup.
- Confirmed `PowerToys.Update.exe` remains excluded because it
orchestrates the update.
- Independently reviewed the committed diff with no findings.
- Attempted an x64 Debug build of
`PowerToysSetupCustomActionsVNext.vcxproj`; MSBuild stopped before
compilation because `Microsoft.Windows.CppWinRT.props` is missing from
the local NuGet package cache.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 95f93bd1-c36d-4560-bb1c-837e7135c4a2
2026-08-25 08:30:25 +00:00

70 KiB