3

We have a few games on our computer that don't play well with HDR mode. I was hoping to find some kind of Powershell script or even a small CLI application I could run to turn HDR mode on or off. Then I could change the game shortcut to a script that would: disable HDR, run the game, wait for exit, restore HDR mode.

While searching online, I did find an application (here) that is supposed to toggle but a) it's a blind toggle - you can't check first if it's enabled or not, and b) it doesn't actually work for me. Looking through the Issues page, it seems to be a Windows 11 problem, and the last update was 2020 so I'm not expecting anything to happen there.

I think I could write a simple AutoIt or AutoHotkey script to simulate the keyboard toggle shortcut (Win+Alt+B) but like above, that's a blind toggle, not great for a script. Plus I believe it relies on the Xbox game bar, so if there's an issue with that the toggle may not work.

1

3 Answers 3

1

https://github.com/patrick-theprogrammer/WindowsDisplayManager

There you go. You can enable or disable HDR and check the current HDR status.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Mar 23 at 23:06
1

The quickest way to do this is to use Win+Alt+b to toggle HDR mode, then start your game.

Alternative methods utilising a CLI will likely require a reboot, which won't meet your requirement.

1
  • This command does not work on Windows 11.
    – Jack Cole
    Commented Aug 6, 2023 at 10:27
0

I made switch_HDR.vbs script:

Set oShell = CreateObject("WScript.Shell")
oShell.Run("""ms-settings:display""")
WScript.Sleep 1000

' Loop to send TAB key
For i = 1 To 16
    oShell.SendKeys "{TAB}"
    WScript.Sleep 5
Next

' Send SPACE key and close the window
oShell.SendKeys " "
WScript.Sleep 1000
oShell.SendKeys "%{F4}"

It opens settings and tabbing to the hdr setting and change it. May need changes after windows update if settings will change.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .