If you are using Windows 10, you will find a Light and Dark theme for Settings app in Colors section under Personalization settings. By default, it uses Light theme as this is more user-friendly. But, some people do not want to get eye strain and hence, they use the Dark Theme at night. This tutorial will let you enable dark theme automatically on Windows 10.
Automatically enable Dark Theme on Windows 10
While you can always manually enable the Dark Theme via the Settings app, you can also use the Windows Task Scheduler to create a task that automatically enables and disable the dark Theme according to your parameters.
To do so, you will have to use PowerShell and Task Scheduler. You need to create two PowerShell scripts and use them with Task Scheduler so that they can run as per your predefined time.
Open Notepad and save the following two lines of code separately with .ps1 extension.
To enable Dark Mode:
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force
To re-enable Light Mode:
Remove-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme
After creating two separate .ps1 files, open Task Scheduler. Search for Task Scheduler in the Taskbar search box. Here, you have to create two different tasks. One task will be performed to enable the Dark theme, and another task will be conducted to re-enable the Light theme.
Here, you have to create two different tasks. One task will be performed to enable the Dark theme, and another task will be conducted to re-enable the Light theme.
After opening Task Scheduler, click on Create Basic Task to schedule a Basic Task. This should be visible on the right-hand side.
Enter a name of this task. Select Daily in the Trigger, and set date and time when you want to start and keep using the script. You need to select a time when you want to perform the task. After that, choose,
After that, choose, Start a program in the Action section. On the next page, enter the following line in the Program/script path area;
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "dark-theme—script-file-path"
Complete the wizard to its conclusion.
Now, in the same way, you have to create another task to activate the Light Theme.
One setback of this trick is it doesn’t work when your computer is shut down. For instance, let’s assume that you have selected 6 PM for enabling the Dark mode. If your computer is not turned on at 6 PM, this script won’t work or the task cannot be performed and the Dark theme won’t be enabled.
If you like dark themes, you might want to take a look at these posts too:
- Enable Dark Theme in Edge browser
- Enable Dark theme on new Edge Chromium browser
- Switch to Dark Gray theme in Office
- Enable Dark Mode in Movies & TV App
- Enable Dark theme for Twitter App.