RECOMMENDED: Click here to fix Windows errors and optimize system performance
If you are using Windows 10, you will find a light and dark theme for the settings in the Colors section of the Customization Settings. By default, the light theme is used because it is more user-friendly. But, some people do not want to tire their eyes and, therefore, they use the dark theme at night. With this tutorial you can automatically activate the dark subject under Windows 10.
Automatic dark theme activation in Windows 10
Although you can manually enable the dark theme at any time via the Settings application, you can also use the Windows Task Scheduler to create a task that automatically enables and disables the dark theme based on your settings.
To do this, you must use PowerShell and Task Scheduler. You must create two PowerShell scripts and use them with the task scheduler to run them at the preset time.
Open Notepad and save the following two lines of code separately with extension .ps1 .
To enable dark mode:
New-ItemProperty path HKCU:SOFTWAREMicrosoftWindowsCurrentVersionThemesPersonalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force
Restarting light mode :
Delete-ItemProperty path HKCU:SOFTWAREMicrosoftWindowsCurrentVersionThemesPersonalize -Name AppsUseLightTheme
After you create two. .. separate ps1, open the task scheduler. Search for the task scheduler in the taskbar search field. Here you have to create two different tasks. One task is executed to activate the Dark theme, and another task is executed to activate the Light theme again.
Here you must create two different tasks. One task is executed to activate the Dark theme, and another task is executed to activate the Light theme again.
After opening the task scheduler, click Create Basic Task to schedule a basic task. This should be visible on the right side.
Enter a name for this task. Select Daily In the Trigger and set the date and time you want to start and continue using the script. You must select a time at which you want to perform the task. Then select
Then select Start a program in section Action . On the next page, in the Program/Script Path area, type the following line;
%SystemRoot%system32WindowsPowerShellv1.0powershell.exe -runningPolicy Bypass file'dark-theme-script-file-path'
Complete the wizard until it is complete.
Now you must create another task in the same way to activate the light theme.
A downside of this trick is that it does not work when your computer shuts down. For example, suppose you selected 6 MPs to activate dark mode. If your computer is not turned on at 6pm, this script will not work or the task cannot be executed and the’Dark’ theme will not be enabled.