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.

therks
  • 256

3 Answers3

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

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

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

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.