Skip to content

fix: sync LockScreen service with script migration (Atlas-OS/Atlas#1666)#67

Open
Stensel8 wants to merge 2 commits into
Atlas-OS:mainfrom
Stensel8:lockscreen-fixes
Open

fix: sync LockScreen service with script migration (Atlas-OS/Atlas#1666)#67
Stensel8 wants to merge 2 commits into
Atlas-OS:mainfrom
Stensel8:lockscreen-fixes

Conversation

@Stensel8

@Stensel8 Stensel8 commented May 23, 2026

Copy link
Copy Markdown

Old version: #66.

This brings the Toolbox's LockScreenConfigurationService in sync with the script migration done in Atlas-OS/Atlas#1666.

The Atlas scripts were updated to handle both NoLockScreen and NoChangingLockScreen registry values. Without NoChangingLockScreen being cleared on re-enable, the lock screen settings stayed greyed out in Windows Settings ("managed by your organization") even after toggling the lock screen back on via the Toolbox.

Changes:

  • Enable() now also deletes NoChangingLockScreen alongside NoLockScreen, which is what kept Settings greyed out
  • Disable() now also sets NoChangingLockScreen = 1 to be consistent with what the scripts do
  • Both Disable() and Enable() now reference the .ps1 script paths instead of the deleted .cmd files

Tested locally: toggling off and on via the Toolbox correctly sets and clears both registry values, and the lock screen works as expected after re-enabling.

This fixes: #68

Related: Atlas-OS/Atlas#1664
Related: Atlas-OS/Atlas#1666
Related: #68

Copilot AI review requested due to automatic review settings May 23, 2026 18:51
@Stensel8 Stensel8 mentioned this pull request May 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Stensel8 Stensel8 requested a review from Copilot May 25, 2026 17:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment on lines +19 to +22
private static readonly string LockScreenScriptDir = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.Windows),
@"AtlasDesktop\4. Interface Tweaks\Lock Screen"
);
RegistryHelper.SetValue(PERSONALIZATION_KEY_NAME, NO_CHANGING_LOCK_SCREEN_VALUE_NAME, 1, Microsoft.Win32.RegistryValueKind.DWord);
RegistryHelper.SetValue(ATLAS_STORE_KEY_NAME, STATE_VALUE_NAME, 0);
RegistryHelper.SetValue(ATLAS_STORE_KEY_NAME, "path", @$"{Environment.GetEnvironmentVariable("windir")}\AtlasDesktop\4. Interface Tweaks\Lock Screen\Hide Lock Screen.cmd");
RegistryHelper.SetValue(ATLAS_STORE_KEY_NAME, "path", Path.Combine(LockScreenScriptDir, "Hide Lock Screen.ps1"));
RegistryHelper.DeleteValue(PERSONALIZATION_KEY_NAME, NO_CHANGING_LOCK_SCREEN_VALUE_NAME);
RegistryHelper.SetValue(ATLAS_STORE_KEY_NAME, STATE_VALUE_NAME, 1);
RegistryHelper.SetValue(ATLAS_STORE_KEY_NAME, "path", @$"{Environment.GetEnvironmentVariable("windir")}\AtlasDesktop\4. Interface Tweaks\Lock Screen\Show Lock Screen (default).cmd");
RegistryHelper.SetValue(ATLAS_STORE_KEY_NAME, "path", Path.Combine(LockScreenScriptDir, "Show Lock Screen (default).ps1"));
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.

Bug: The Lockscreen enable/disable script is not working as expected

2 participants