How to toggle HDR with a script on Windows 10

Windows 10 supports HDR. If you have the hardware to support it, you can enable it from the Settings app. The option is a bit buried though so it wouldn’t come as a surprise if the common user doesn’t know it even exists. If you do have the hardware to watch HDR content, you might want a quicker way to enable it. There’s no Quick Action for it in the Action Center which is why a script is the way to go.

how to toggle hdr with a script on windows 10 How to toggle HDR with a script on Windows 10

Toggle HDR script

In order to toggle HDR, we’re going to need two scripts; one to enable it and one to disable it. These scripts have been written by Reddit user u/tannerjohngates.

Enable HDR script

Open a new Notepad file and paste the following in it;

Set oShell = CreateObject("WScript.Shell") oShell.Run("""ms-settings:display""") WScript.Sleep 2000 oShell.AppActivate "settings" WScript.Sleep 100 oShell.SendKeys "{TAB}" WScript.Sleep 60 oShell.SendKeys "{TAB}" WScript.Sleep 60 oShell.SendKeys "{TAB}" WScript.Sleep 60 oShell.SendKeys " " WScript.Sleep 3000 oShell.SendKeys "{TAB}" WScript.Sleep 50 oShell.SendKeys " " WScript.Sleep 50 oShell.SendKeys "%{F4}"

Save this script with the .VBS file extension and give it a name that tells you it will enable HDR.

how to toggle hdr with a script on windows 10 1 How to toggle HDR with a script on Windows 10

Disable HDR script

Open a new Notepad file and paste the following in it. Again, save it with the .VBS file extension and give it a name that tells you it will disable HDR.

Set oShell = CreateObject("WScript.Shell") oShell.Run("""ms-settings:display""") WScript.Sleep 2000 oShell.AppActivate "settings" WScript.Sleep 100 oShell.SendKeys "{TAB}" WScript.Sleep 60 oShell.SendKeys "{TAB}" WScript.Sleep 60 oShell.SendKeys " " WScript.Sleep 3000 oShell.SendKeys "{TAB}" WScript.Sleep 50 oShell.SendKeys " " WScript.Sleep 50 oShell.SendKeys "%{F4}"

When you run these scripts, they will open the Settings app, automatically select the System group of settings, go to the Display tab, select the HDR option on the Display tab, and then enable it.

The script isn’t going to run in the background, nor is it going to tweak anything in the registry. It is still going through the Settings app so you don’t have to worry about it changing something that you can’t change on your own.

Since this is a script, it might run into some trouble if you have multiple displays and only one of them supports HDR. The script cannot select a different display and when the Setting app is opened, your primary display is the one that is selected by default. If it doesn’t support HDR, this script won’t be of much use to you.

The simple work around to this is to set the display that supports HDR as your primary display. Microsoft has, surprisingly, neglected to add a toggle for this in the Action center even though it would be pretty useful.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.