mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-06-10 18:46:28 +00:00
17 lines
502 B
PowerShell
17 lines
502 B
PowerShell
# Checks if the system is set to use dark mode for apps
|
|
function GetSystemUsesDarkMode {
|
|
try {
|
|
$personalizeKey = Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize'
|
|
|
|
if ($null -eq $personalizeKey) {
|
|
Write-Host "WARNING: Unable to retrieve personalization settings." -ForegroundColor Yellow
|
|
return $false
|
|
}
|
|
|
|
return $personalizeKey.AppsUseLightTheme -eq 0
|
|
}
|
|
catch {
|
|
return $false
|
|
}
|
|
}
|