Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .gitattributes
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=crlf
*.cmd eol=crlf
*.sh eol=lf
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Claude Code
.claude/

# MacOS
.DS_Store

Expand Down

This file was deleted.

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
Comment thread
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
}

This file was deleted.

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
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#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.
# ============================================================================

Write-Host '[>>] Restarting Explorer...' -ForegroundColor Yellow
Stop-Process -Name 'explorer' -Force -ErrorAction SilentlyContinue
Write-Host '[OK] Explorer restarted.' -ForegroundColor Green
6 changes: 5 additions & 1 deletion src/playbook/Executables/DEFAULT.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ Get-ChildItem -Path $registryPath | ForEach-Object {
$scriptPath = $path.path
if (Test-Path $scriptPath) {
Write-Host "Running: $scriptPath" -ForegroundColor Cyan
& $scriptPath /silent
if ($scriptPath -like '*.ps1') {
& $scriptPath -Silent
} else {
& $scriptPath /silent
}
Comment thread
Stensel8 marked this conversation as resolved.
} else {
Write-Host "Script not found: $scriptPath" -ForegroundColor Red
}
Expand Down
Binary file modified src/playbook/Executables/DEFAULT.reg
Binary file not shown.
Loading