Skip to content

Fix: honor startup show-state flags when relaunching elevated #12

Open

Description

@itlezy

Decision: ACCEPT a narrow adaptation, lower priority than data integrity fixes.

Source: johnwait@937b7ff
Original discussion: XhmikosR#153
Parent review: #2.

Current RelaunchElevated blindly uses STARTUPINFO.wShowWindow, which is meaningful only when STARTF_USESHOWWINDOW is set. Use the supplied show state if that flag is present; otherwise SW_SHOWNORMAL. Unlike the source fork's zero fallback, preserve an explicitly requested SW_HIDE. Port just the show-state expression; no automatic read-only elevation feature, file probes, RPC dependency or new settings.

Acceptance: verify default flags/zero show state, explicitly normal/maximized/minimized/hidden states, Unicode/spaced filenames, UAC success and cancellation. An interactive standard-user check is required for actual UAC behavior; a unit check alone is insufficient. Preserve attribution. Source inspection only; no UAC test or implementation occurred during this review.

Activity

  1. itlezy commented on Nov 9, 2026

    @itlezy
    OwnerAuthor

    Implemented locally in 7b0e406: honor STARTF_USESHOWWINDOW, otherwise use SW_SHOWNORMAL. Source-linked native contract checks verify absent flag and explicit maximized/minimized/hidden states on x86/x64 Release/Debug. Application builds and full Python suite pass. Actual UAC success/cancellation and standard-user interaction are NOT runtime-validated in this elevated session; keep this issue open for that check and integration. Not pushed/deployed.

  2. itlezy commented on Nov 9, 2026

    @itlezy
    OwnerAuthor

    Published the focused follow-up as https://github.com/itlezy/notepad2-mod/releases/tag/v4.2.25.1040-rc.1 (merged PR #13).

    Hosted CI passed Release/Debug x86/x64 using pytest and pywinauto. Downloaded both public archives, verified SHA256 checksums, source/version metadata and executable hashes, then ran all 94 tests against each downloaded binary successfully.

    The release includes the save-prompt and MRU fixes, deterministic source charset, flag-aware elevated visibility, and the requested line copy/cut/paste shortcuts. The standard-user UAC interaction check remains manual in #12. System-wide installed executable and associations were not updated by this release task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions