Repository navigation
Keep Start-menu sleep and shut down working on the console with exclusive seats - #117
Open
mlopezsegura wants to merge 1 commit into
Open
mlopezsegura wants to merge 1 commit into
mlopezsegura wants to merge 1 commit into
Conversation
An exclusive seat removes "Shut down the system" from the Users group so its isolated user can't shut the PC down. Administrators kept it, but an administrator's UAC-filtered token (Explorer, the Start menu) doesn't get the rights of the Administrators group, so Start > Sleep/Shut down silently did nothing on the console (#105). Before removing it from Users, every enabled local account that isn't an osms- user, and whoever is signed in at the console, now gets the right on its own account. This runs every time, so it also repairs PCs where an earlier version already removed it, and the service gives it to a new console user while Users doesn't have it. The accounts it was given to are recorded and lose it again on uninstall. It takes effect at each user's next sign-in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Fixes #105.
An exclusive seat removes Shut down the system (
SeShutdownPrivilege) from the Users group so its isolated user can't shut the PC down. Administrators kept it, but an administrator's UAC-filtered token (Explorer, the Start menu) doesn't get the rights of the Administrators group. So Start → Sleep / Shut down silently did nothing on the console.osms-user, and whoever is signed in at the console (also domain or Microsoft accounts), gets the right on its own account.ProgramData\OpenStreamMS\shutdown-right-grantedand lose it again on uninstall, along with Users getting it back.Isolated users are still created as standard users. If one is made an administrator, it can elevate and the restriction can't hold; that's unchanged.
Tests:
ShutdownRightTests(5 new: which accounts keep the right) and the full suite (215) pass. Not tried on a PC with an exclusive seat yet.🤖 Generated with Claude Code