fix: sync LockScreen service with script migration (Atlas-OS/Atlas#1666)#67
Open
Stensel8 wants to merge 2 commits into
Open
fix: sync LockScreen service with script migration (Atlas-OS/Atlas#1666)#67Stensel8 wants to merge 2 commits into
Stensel8 wants to merge 2 commits into
Conversation
…g missing registry value deletion This fix ensures the toolbox is in sync with: Atlas-OS/Atlas#1666
Closed
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")); |
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.
Old version: #66.
This brings the Toolbox's
LockScreenConfigurationServicein sync with the script migration done in Atlas-OS/Atlas#1666.The Atlas scripts were updated to handle both
NoLockScreenandNoChangingLockScreenregistry values. WithoutNoChangingLockScreenbeing 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 deletesNoChangingLockScreenalongsideNoLockScreen, which is what kept Settings greyed outDisable()now also setsNoChangingLockScreen = 1to be consistent with what the scripts doDisable()andEnable()now reference the.ps1script paths instead of the deleted.cmdfilesTested 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