GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Hide the console for WinRM remoting by SteveL-MSFT · Pull Request #86 · PowerShell/PowerShell-Native

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Dec 14, 2022

Copy link
Copy Markdown
Member

PR Summary

The change to allocate a console so that the codepage is set correctly had the side effect of showing the console. This change was deemed least risky to hide the console immediately. Downside is there can be a flash of the console, but we can consider other fixes longer term with proper validation while this is needed to be backported to 7.3

PR Context

Fix #85

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

metablaster reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@SteveL-MSFT
hide the console for WinRM remoting
bf811d3
@SteveL-MSFT
Steve Lee (SteveL-MSFT) requested review from Paul Higinbotham (PaulHigin) and Aditya Patwardhan (adityapatwardhan) December 14, 2022 23:11
@SteveL-MSFT Steve Lee (SteveL-MSFT) added the Backport-7.3.x label Dec 14, 2022
daxian-dbw
Dongbo Wang (daxian-dbw) approved these changes Dec 14, 2022
View reviewed changes

@daxian-dbw Dongbo Wang (daxian-dbw) left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) approved these changes Dec 15, 2022
View reviewed changes
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit 06d8c01 into PowerShell:master Dec 15, 2022
iSazonov
Ilya (iSazonov) reviewed Dec 15, 2022
View reviewed changes
Comment thread src/powershell-native/nativemsh/pwrshplugin/pwrshclrhost.cpp
// Allocate a console so that the codepage is setup correctly
AllocConsole();
HWND console = GetConsoleWindow();
if (console != NULL)

@iSazonov Ilya (iSazonov) Dec 15, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

AllocateConsole returns HWND and since winrm haven't a console before the call returns real handle. It seems we have no need to call GetConsoleWindows.
https://learn.microsoft.com/en-us/windows/console/allocconsole

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@daxian-dbw Dongbo Wang (daxian-dbw) daxian-dbw approved these changes
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) adityapatwardhan approved these changes
@PaulHigin Paul Higinbotham (PaulHigin) Awaiting requested review from PaulHigin
+1 more reviewer
@iSazonov Ilya (iSazonov) iSazonov left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Backport-7.3.x

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

New-PSSession throws a black window named 'c:\windows\system32\wsmprovhost.exe'

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@SteveL-MSFT @daxian-dbw @adityapatwardhan @iSazonov
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.