Repository navigation
PC window over Remote Desktop; Windows Wake-on-LAN check and fix - #6
Merged
Merged
Conversation
The window answered only programs in the console session or elevated ones, so an administrator over Remote Desktop saw "only for the person signed in at this PC's screen" right after installing. An administrator's limited (UAC) token is now accepted too: UAC doesn't keep an administrator out, so this didn't protect anything. Standard accounts in another session are still refused, and the message says what to do. Windows CI now runs the check against a real loopback connection. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Started with -EncodedCommand, PowerShell writes progress ("Preparing
modules for first use"), warnings and errors to stderr as CLIXML. The
helper read stdout and stderr together and took the last line, so the
check reported Wake-on-LAN off while it may have been on, and Fix
failed with "the driver reports magic-packet wake as <Objs ...".
powershell() now turns progress off, stops on any error, returns only
stdout, and reports an error as PowerShell's own message. The check
says when it couldn't read the setting instead of calling it off, and
a failing powercfg step no longer stops the fix (Windows PowerShell
turns a native program's stderr into an error under 'Stop'). Windows
CI now runs these against real PowerShell.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Right after installing over Remote Desktop, the PowerDeck window showed only "PowerDeck's window is only for the person signed in at this PC's screen. Over Remote Desktop, open PowerDeck as administrator."
Cause. The window's local server lets in programs in the active console session, or elevated programs. Over Remote Desktop the session isn't the console's, and the window that
install.ps1opens isn't elevated, so even the PC's administrator was refused.Fix.
winsvc.LocalCallernow also accepts a process whose token is an administrator's limited UAC token (TokenElevationTypeLimited). UAC doesn't keep an administrator out (they can elevate), so refusing them protected nothing.Test. New Windows-only test
TestLocalCallerFindsTheProcess:owningPIDfinds this process in the TCP table and thatLocalCallerlets an administrator in;The Windows CI step now runs
./internal/winsvc/(with-v, so a skip is visible).Wake-on-LAN on Windows
After installing, the check said Wake-on-LAN is off on Ethernet, and Fix failed with
the driver reports magic-packet wake as "<Objs Version="1.1.0.1" …"followed by PowerShell progress records ("Preparing modules for first use",Get-NetAdapterPowerManagement…).Cause.
-EncodedCommand, Windows PowerShell writes its progress, warning and error streams to stderr as CLIXML.powershell()read stdout and stderr together (CombinedOutput) and took the last line, which was the XML.Fix.
powershell()turns progress off and stops on any error.powercfg /deviceenablewakeis best effort: Windows PowerShell turns a native program's stderr into an error underStop, so a failure there no longer stops the fix.Test. New Windows-only tests in
internal/setuprun real PowerShell, and the Windows CI step now includes the package.throw,Write-Errorand a NetAdapter cmdlet error each come back as a readable message.🤖 Generated with Claude Code