1. Home
  2. Windows

Automatically Switch To The Dark Theme At Night In Windows 10

Windows 10 has a dark and light theme. It applies to all UWP apps. Users can switch to the dark or light theme from the Settings app. What they can’t do is schedule when Windows 10 will automatically switch to a dark or light theme. The Creators Update expected to arrive this month has a Night Light feature that will tint your screen a warm color. You can schedule Night Light but it isn’t the same as switching to the dark theme at night. Here’s how you can automatically switch to the dark theme at night in Windows 10 using a little script and a scheduled task.

You don’t need administrative rights to switch to the dark theme at night. This is something a standard user can do. We’re going to be doing it via a script. You will need to create two scripts; one to switch to the dark theme at night, and one to switch back to the light theme when it’s day.

Script For Dark Theme

Open Notepad and paste the following. Save it as a PS1 file with a suitable name like Dark Theme.

New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force

Script For Light Theme

Open Notepad and paste the following. Save this file as a PS1 file named Light Theme, or something similar.

Remove-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme

Create Scheduled Tasks

We’re now going to create two scheduled tasks. The first task will run the Dark Theme script you just created. The second task will run the Light Theme script. We will use the built-in Task Scheduler app to create and run these tasks. You do not need administrative rights to create and run tasks.

Open Task Scheduler; type Task Scheduler in the Windows search bar and select the app from the search results.

On the Actions pane, select ‘Create Basic Task’. This will open the task wizard.  Enter a name for the task and give it a description. The description is optional but it’s a good idea to add one so you know what the script does. Click ‘Next’.

On the ‘Task Trigger’ screen, select the ‘Daily’ option and click ‘Next again.

To switch to the dark theme at night, set the time to sunset or whenever you think ‘night’ officially starts. Set it to a time when your system will be running e.g., 6PM.

To switch back to the light theme in the morning, enter whenever you consider it to be morning. Set it to a time when you know your system will be active e.g. 8AM and not 4AM when the system is likely to be asleep or Off.

On the ‘Actions’ screen, select ‘Start a program’ and click Next. This is where things will be slightly different for the dark and light scripts you want to run.

For the dark theme, enter the following in the browse field;

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\path-to-script\name-of-Dark-theme-script.ps1"

For the light theme, enter the following in the browse field;

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\path-to-script\name-of-Light-theme-script.ps1"

You will see an alert confirming the parameters you’ve set. Click ‘Yes’ on the alert and you’re all done.

A Caveat

The tasks cannot run if your system is asleep or hibernating. If you set the task to run at a time when your system is likely to be in an off state, this won’t work for you. You will have to manually run the scripts. This is why you have to be careful when you set the time for the task to be run. Set it to a time you know your system will be running.

This little trick is the brainchild of Reddit user exile09.

Leave a comment

  • Yeah I pulled progress to get $98567.I heard about this project half a year prior and a couple of months back I have experimented it and I have taken home such an outstanding funds. It is highly valuable for me and my household.My friends and relatives are skeptical to check how really I settled my Lifestyle in few days. Thanks to GOD for it….You can as well get such a great amount of wealth, if you own a laptop and net connection at home. Other complex expertness are not required to undertake this job. I am Liking it and all of you will also love it and you will definitely not pardon yourself if you not at all take a look at the information >>>>>> ADULTADDA.NET/2Yz

  • yep I got progress to earn $98567.I heard about this gig half a year ago and a pair of months before I already have checked out and I have got such a great bucks. It is extremely valuable for me individually and also my whole family.My relatives and friends are skeptical to to find how really I settled my Lifestyle in very less time. Thank you Almighty for this….You can as well receive such a great amount of money, if you have a laptop or pc and internet access in your household. Extra specialized knowledge are not required to undertake this gig. I am Liking it and all of you will surely love it and you will definitely not pardon yourself if you not explore the info >>>>>> RU.VU/qpBGw

  • Earning using the internet can be as quick (or perhaps as complex) just as generating an income off-line. Despite the fact that tens of thousands of Web marketing industry professionals believe to have got a strategy system for making easy cash, the fact is, it does not have any opportunity you will be able to turn out to be rich overnight through clicking a key or simply shopping several ebook. Creating wealth on the net ought to have working hard and commitment. For anybody who is ready to input the amount of time as well as work involved, you will discover methods to creating large earning potential on-line.I am obtaining $10 thousand possibly even more regular monthly with this venture.Here’s the technique to earn a living although the others are longer term making extra money ideas >>>>> GET.LC/hbY52