Skip to content

Instantly share code, notes, and snippets.

@coulterpeterson
Created November 24, 2023 17:44
Show Gist options
  • Save coulterpeterson/663401f619a41b2963e4bb1572333236 to your computer and use it in GitHub Desktop.
Save coulterpeterson/663401f619a41b2963e4bb1572333236 to your computer and use it in GitHub Desktop.
Windows 11 Light Mode/Dark Mode Shortcuts

To pin to start menu, create a shortcut of the .bat file, then edit the properties of the shortcut. Then, change the "target" from something like C:\scripts\lightMode.bat to cmd /c "C:\scripts\lightMode.bat". That shortcut can now be pinned to the start menu for easy access 👍

REM Enable Dark Theme
powershell -command "New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 1 -Type Dword -Force; New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force"
REM Enable Light Theme
powershell -command "New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 1 -Type Dword -Force; New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 1 -Type Dword -Force"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment