Files
PowerToys/doc/devdocs/modules
Boliang Zhang 8536d7b1cd Fix MSIX sparse package DACL contamination breaking File Explorer preview handlers (#47177)
## Summary

Moves the MSIX sparse package's `ExternalLocation` from the PowerToys
root install folder to the `WinUI3Apps\` subfolder, isolating DACL
contamination from preview handler DLLs.

## Problem

On Windows 23H2/24H2/25H2, MSIX sparse package registration adds
AppContainer SIDs (`S-1-15-2-*` / `S-1-15-3-*`) to the DACL of the
`ExternalLocation` folder. Since `ExternalLocation` pointed to the
PowerToys root install folder, this broke File Explorer preview handlers
— `prevhost.exe` (running at LOW integrity) could no longer load preview
handler DLLs (`.txt`, `.md`, `.pdf`, `.svg`, etc.).

## Fix

- **`CustomAction.cpp`**: Changed `ExternalLocation` from
`installFolderPath` → `installFolderPath + L"WinUI3Apps\\"`
- **`AppxManifest.xml`**: Removed unused PowerOCR `<Application>` entry;
stripped `WinUI3Apps\` prefix from `Executable` paths (now relative to
new ExternalLocation)
- **`CmdPal.Ext.PowerToys.csproj`**: Moved `OutputPath` to `WinUI3Apps\`
so the AOT-compiled extension EXE resolves correctly under the new
ExternalLocation
- **WiX installer files**: Updated source/install paths for KBM assets,
CmdPal satellite assemblies, and `CommandPalette.Extensions.winmd` that
moved with the CmdPal output
- **ESRP signing**: Updated CmdPal dll/exe paths to include
`WinUI3Apps\` prefix

## Validation

| Test | 25H2 | 23H2 |
|------|------|------|
| DACL isolation (no S-1-15-* on root) |  |  |
| Preview handlers (.txt, .md, .pdf, .svg) |  |  |
| Peek |  |  |
| Context menus (PowerRename, FileLocksmith, ImageResizer, New+) |  | 
|
| Upgrade path (old → new) |  |  |

## Files changed (12)

- `installer/PowerToysSetupCustomActionsVNext/CustomAction.cpp` — core
fix
- `src/PackageIdentity/AppxManifest.xml` — manifest cleanup
-
`src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PowerToys/Microsoft.CmdPal.Ext.PowerToys.csproj`
— output path
-
`src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PowerToys/Helpers/PowerToysResourcesHelper.cs`
— icon path
- `installer/PowerToysSetupVNext/BaseApplications.wxs` — winmd source
path
- `installer/PowerToysSetupVNext/KeyboardManager.wxs` — KBM assets path
- `installer/PowerToysSetupVNext/Resources.wxs` — CmdPal satellite paths
- `installer/PowerToysSetupVNext/generateAllFileComponents.ps1` — scan
path
- `.pipelines/ESRPSigning_core.json` — signing paths
- `src/PackageIdentity/BuildSparsePackage.ps1` — dev script hint
- `src/PackageIdentity/readme.md` — docs
- `doc/devdocs/modules/cmdpal/powertoys-extension-local-development.md`
— docs

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 22:37:59 +08:00
..

PowerToys Modules

This section contains documentation for individual PowerToys modules, including their architecture, implementation details, and debugging tools.

Available Modules

Module Description
Advanced Paste Tool for enhanced clipboard pasting with formatting options
Always on Top Tool for pinning windows to stay on top of other windows
Awake Tool to keep your computer awake without modifying power settings
Color Picker Tool for selecting and managing colors from the screen
Command Not Found Tool suggesting package installations for missing commands
Crop and Lock Tool for cropping application windows into smaller windows or thumbnails
Environment Variables Tool for managing user and system environment variables
FancyZones (debugging tools) Window manager utility for custom window layouts
File Explorer add-ons Extensions for enhancing Windows File Explorer functionality
File Locksmith Tool for finding processes that lock files
Hosts File Editor Tool for managing the system hosts file
Image Resizer Tool for quickly resizing images within File Explorer
Keyboard Manager Tool for remapping keys and keyboard shortcuts
Mouse Utilities Collection of tools to enhance mouse and cursor functionality
Mouse Without Borders Tool for controlling multiple computers with a single mouse and keyboard
NewPlus Context menu extension for creating new files in File Explorer
Peek File preview utility for quick file content viewing
Power Rename Bulk file renaming tool with search and replace functionality
PowerToys Run (deprecation soon) Quick application launcher and search utility
Quick Accent Tool for quickly inserting accented characters and special symbols
Registry Preview Tool for visualizing and editing Registry files
Screen Ruler Tool for measuring pixel distances and color boundaries on screen
Shortcut Guide Tool for displaying Windows keyboard shortcuts when holding the Windows key
Text Extractor Tool for extracting text from images and screenshots
Workspaces Tool for saving and restoring window layouts for different projects
ZoomIt Screen zoom and annotation tool

Adding New Module Documentation

When adding documentation for a new module:

  1. Create a dedicated markdown file for the module (e.g., modulename.md)
  2. If the module has specialized debugging tools, consider creating a separate tools document (e.g., modulename-tools.md)
  3. Update this index with links to the new documentation
  4. Follow the existing documentation structure for consistency