Skip to content

Conversation

@dido18
Copy link
Contributor

@dido18 dido18 commented Dec 15, 2025

Motivation

After #5, the executable is launched, and the terminal is hidden.

This change caused an issue with the AppLab update on Windows because the installer was launched with the 'hidden' attribute, so the user was unable to see it.

Changes

Add the hideWindow parameter to the RunElevated to specify whether to hide the executable launched.

NOTE: This is a hotfix. The added boolean parameter introduces a not clear interface. We want to refactor it in a second moment.

Other resources

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new WindowVisibility parameter to the RunElevated function on Windows, allowing callers to control whether the elevated process window is shown or hidden. Previously, the window was always hidden using SW_HIDE. The change introduces a new enum type with two options: WindowHidden and WindowShown, which are mapped to Windows show mode constants via a switch statement.

Key Changes:

  • Introduced WindowVisibility type with WindowHidden and WindowShown constants
  • Modified RunElevated function signature to accept a visibility parameter
  • Replaced hardcoded SW_HIDE with dynamic showMode based on the visibility parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dido18 dido18 changed the title feat: Add WindowVisibility option to RunElevated on Windows feat: Add hideWindow option to RunElevated on Windows Dec 15, 2025
@dido18 dido18 marked this pull request as ready for review December 15, 2025 13:54
@dido18 dido18 merged commit 89d4510 into main Dec 15, 2025
1 check passed
@Xayton Xayton deleted the show-window branch December 15, 2025 13:57
@dido18 dido18 changed the title feat: Add hideWindow option to RunElevated on Windows hotfix: Add hideWindow option to RunElevated on Windows Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants