-
-
Notifications
You must be signed in to change notification settings - Fork 747
fix: lock screen & explorer scripts #1666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
RadNotRed
merged 3 commits into
Atlas-OS:new-update
from
Stensel8:fix/lock-screen-ps1-migration
May 20, 2026
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # perform crlf normalization on batch and cmd files | ||
| *.ps1 eol=crlf | ||
| *.psm1 eol=crlf | ||
| *.bat eol=crlf | ||
| *.cmd eol=crlf | ||
| *.sh eol=lf | ||
| # Line ending normalization | ||
| *.ps1 eol=lf | ||
| *.psm1 eol=lf | ||
| *.bat eol=lf | ||
| *.cmd eol=lf | ||
| *.sh eol=lf | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| # Claude Code | ||
| .claude/ | ||
|
|
||
| # MacOS | ||
| .DS_Store | ||
|
|
||
|
|
||
31 changes: 0 additions & 31 deletions
31
src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Lock Screen/Hide Lock Screen.cmd
This file was deleted.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Lock Screen/Hide Lock Screen.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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| #Requires -Version 5.1 | ||
| # ============================================================================ | ||
| # AtlasOS -- Hide Lock Screen | ||
| # Disables the Windows lock screen via registry policy. | ||
| # Sets NoLockScreen and NoChangingLockScreen so Settings stay accessible | ||
| # (prevents the "managed by your organization" greyed-out state). | ||
| # ============================================================================ | ||
|
|
||
| param( | ||
| [switch]$Silent | ||
| ) | ||
|
|
||
| $ErrorActionPreference = 'Stop' | ||
|
|
||
| $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole( | ||
| [Security.Principal.WindowsBuiltInRole]::Administrator | ||
| ) | ||
| if (-not $isAdmin) { | ||
| $argList = "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" | ||
| if ($Silent) { $argList += ' -Silent' } | ||
| try { | ||
| Start-Process -FilePath 'powershell.exe' -ArgumentList $argList -Verb RunAs -Wait | ||
| } catch { | ||
| Write-Host '[!!] Administrator privileges are required.' -ForegroundColor Red | ||
| if (-not $Silent) { Read-Host 'Press Enter to exit' } | ||
| exit 1 | ||
| } | ||
| exit 0 | ||
| } | ||
|
|
||
| $settingName = 'LockScreen' | ||
| $stateValue = 0 | ||
|
Stensel8 marked this conversation as resolved.
|
||
| $scriptPath = $PSCommandPath | ||
|
|
||
| try { | ||
| $atlasKey = "HKLM:\SOFTWARE\AtlasOS\Services\$settingName" | ||
| if (-not (Test-Path $atlasKey)) { New-Item -Path $atlasKey -Force | Out-Null } | ||
| Set-ItemProperty -Path $atlasKey -Name 'state' -Value $stateValue -Type DWord -Force | ||
| Set-ItemProperty -Path $atlasKey -Name 'path' -Value $scriptPath -Type String -Force | ||
|
|
||
| $policyKey = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization' | ||
| if (-not (Test-Path $policyKey)) { New-Item -Path $policyKey -Force | Out-Null } | ||
| Set-ItemProperty -Path $policyKey -Name 'NoLockScreen' -Value 1 -Type DWord -Force | ||
| Set-ItemProperty -Path $policyKey -Name 'NoChangingLockScreen' -Value 1 -Type DWord -Force | ||
|
|
||
| if (-not $Silent) { | ||
| Write-Host '[OK] Lock screen hidden.' -ForegroundColor Green | ||
| Read-Host 'Press Enter to exit' | ||
| } | ||
| } catch { | ||
| Write-Host "[!!] Failed to hide lock screen: $_" -ForegroundColor Red | ||
| exit 1 | ||
| } | ||
31 changes: 0 additions & 31 deletions
31
...k/Executables/AtlasDesktop/4. Interface Tweaks/Lock Screen/Show Lock Screen (default).cmd
This file was deleted.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
...k/Executables/AtlasDesktop/4. Interface Tweaks/Lock Screen/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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| #Requires -Version 5.1 | ||
| # ============================================================================ | ||
| # AtlasOS -- Show Lock Screen (default) | ||
| # Restores the Windows lock screen to its default (visible) state. | ||
| # Removes NoLockScreen and NoChangingLockScreen so Settings are no longer | ||
| # greyed out / "managed by your organization". | ||
| # ============================================================================ | ||
|
|
||
| param( | ||
| [switch]$Silent | ||
| ) | ||
|
|
||
| $ErrorActionPreference = 'Stop' | ||
|
|
||
| $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole( | ||
| [Security.Principal.WindowsBuiltInRole]::Administrator | ||
| ) | ||
| if (-not $isAdmin) { | ||
| $argList = "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" | ||
| if ($Silent) { $argList += ' -Silent' } | ||
| try { | ||
| Start-Process -FilePath 'powershell.exe' -ArgumentList $argList -Verb RunAs -Wait | ||
| } | ||
| catch { | ||
| Write-Host '[!!] Administrator privileges are required.' -ForegroundColor Red | ||
| if (-not $Silent) { Read-Host 'Press Enter to exit' } | ||
| exit 1 | ||
| } | ||
| exit 0 | ||
| } | ||
|
|
||
| $settingName = 'LockScreen' | ||
| $stateValue = 1 | ||
| $scriptPath = $PSCommandPath | ||
|
|
||
| try { | ||
| $atlasKey = "HKLM:\SOFTWARE\AtlasOS\Services\$settingName" | ||
| if (-not (Test-Path $atlasKey)) { New-Item -Path $atlasKey -Force | Out-Null } | ||
| Set-ItemProperty -Path $atlasKey -Name 'state' -Value $stateValue -Type DWord -Force | ||
| Set-ItemProperty -Path $atlasKey -Name 'path' -Value $scriptPath -Type String -Force | ||
|
|
||
| $policyKey = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization' | ||
| Remove-ItemProperty -Path $policyKey -Name 'NoLockScreen' -ErrorAction SilentlyContinue | ||
| Remove-ItemProperty -Path $policyKey -Name 'NoChangingLockScreen' -ErrorAction SilentlyContinue | ||
|
|
||
| if (-not $Silent) { | ||
| Write-Host '[OK] Lock screen restored.' -ForegroundColor Green | ||
| Read-Host 'Press Enter to exit' | ||
| } | ||
| } | ||
| catch { | ||
| Write-Host "[!!] Failed to restore lock screen: $_" -ForegroundColor Red | ||
| exit 1 | ||
| } |
3 changes: 0 additions & 3 deletions
3
src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Restart Explorer.cmd
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
src/playbook/Executables/AtlasDesktop/4. Interface Tweaks/Restart Explorer.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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #Requires -Version 5.1 | ||
| # ============================================================================ | ||
| # AtlasOS -- Restart Explorer | ||
| # Restarts Windows Explorer to apply pending UI changes. | ||
| # Windows automatically relaunches explorer.exe as the shell after termination. | ||
| # ============================================================================ | ||
|
|
||
| $ErrorActionPreference = 'Stop' | ||
|
|
||
| try { | ||
| Write-Host '[>>] Restarting Explorer...' -ForegroundColor Yellow | ||
| Stop-Process -Name 'explorer' -Force -ErrorAction SilentlyContinue | ||
|
|
||
| Write-Host '[OK] Explorer restarted.' -ForegroundColor Green | ||
| } catch { | ||
| Write-Host "[!!] Failed to restart Explorer: $_" -ForegroundColor Red | ||
| exit 1 | ||
|
Stensel8 marked this conversation as resolved.
Outdated
|
||
| } | ||
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
Binary file not shown.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.