Skip to content

Enable Windows uiAccess for signed MSI and MSIX installations - #110

Merged
Marc-André Moreau (mamoreau-devolutions) merged 2 commits into
masterfrom
copilot/print-screen-capture-compatibility
Nov 17, 2026
Merged

Marc-André Moreau (mamoreau-devolutions) merged 2 commits into
masterfrom
copilot/print-screen-capture-compatibility

Conversation

@mamoreau-devolutions

Copy link
Copy Markdown
Contributor

Summary

Enables Windows uiAccess="true" for signed MSI (%ProgramFiles%\Devolutions\Jiffshot) and MSIX installations so global capture hotkeys (RegisterHotKey), topmost selection overlays (ZBID_UIACCESS), and foreground restoration (SetForegroundWindow) work when an elevated (administrator) window is active, without running Jiffshot as administrator. Portable ZIP and unsigned local builds continue to use uiAccess="false" so they can run from any directory.

Fixes #99

Changes

  • Application & MSIX Manifests (assets/icon_res.rs, package/AppxManifest.xml):
    • Embed an RT_MANIFEST (resource type 24, ID 1) in jiffshot.exe with <requestedExecutionLevel level="asInvoker" uiAccess="..." />, enabled when JIFFSHOT_UIACCESS=1 (uiAccess="false" by default).
    • Declare <rescap:Capability Name="uiAccess" /> in package/AppxManifest.xml.
  • Cross-Integrity IPC (Medium $\to$ Medium+):
    • crates/jiffshot-workflow/src/sys/win.rs: Allow WM_APP_CAPTURE, WM_APP_MENU, and WM_APP_CAPTURE_LATER through the window's UIPI filter via ChangeWindowMessageFilterEx(..., MSGFLT_ALLOW) in serve_instance.
    • crates/jiffshot-control/src/lib.rs & crates/jiffshot-capture/src/win/ipc.rs: Add an explicit Medium mandatory label (S:(ML;;NW;;;ME)) to the owner-only named-pipe SDDL (D:P(A;;GA;;;{sid})S:(ML;;NW;;;ME)) so standard-integrity jiffshot-cli.exe and secondary jiffshot.exe instances can connect to a Medium+ (uiAccess) pipe server.
    • crates/jiffshot-cli/src/windows.rs: Fall back to ShellExecuteExW (spawn_via_shell) when CreateProcessW returns ERROR_ELEVATION_REQUIRED (740) so jiffshot-cli can launch a signed uiAccess="true" jiffshot.exe via the Windows AppInfo service.
  • CI Packaging & Docs (.github/workflows/ci.yml, README.md):
    • Build and sign a dedicated jiffshot-${{ matrix.rid }}-packaged artifact (JIFFSHOT_UIACCESS=1 when signed) for the MSI and MSIX installers while keeping portable ZIP builds at uiAccess="false".
    • Verify <rescap:Capability Name="uiAccess" /> in the MSIX installation test and document uiAccess behavior in README.md.

Fixes #99

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@mamoreau-devolutions
Marc-André Moreau (mamoreau-devolutions) merged commit 3899885 into master Nov 17, 2026
16 checks passed
@mamoreau-devolutions
Marc-André Moreau (mamoreau-devolutions) deleted the copilot/print-screen-capture-compatibility branch November 17, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Print Screen or capture just may not work on some applications

1 participant