To schedule dark mode at 7 PM:
schtasks /CREATE /SC DAILY /TN "Enable Dark Mode" /TR "C:\Windows\System32\reg.exe add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize /v AppsUseLightTheme /t REG_DWORD /d 0 /f" /ST 19:00
To schedule light mode at 7 AM:
schtasks /CREATE /SC DAILY /TN "Disable Dark Mode" /TR "C:\Windows\System32\reg.exe add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize /v AppsUseLightTheme /t REG_DWORD /d 1 /f" /ST 7:00
Execute these commands in Command Prompt or PowerShell. There are additional steps you need to do to ensure it is enabled even if you turn on your laptop after the scheduled time.
- Launch Task Scheduler.
- Open the Properties dialog of the tasks we created.
- Go to Settings and check the box "Run task as soon as possible after a scheduled start is missed."
Reference
No comments:
Post a Comment