6

How can I enable immediate light night setting in Windows 10 via a command? This is the setting from inside the "Night light settings" inside "Display" settings, and not the one from "Display" which only enable the general timed setting. Also a command to set the temperature will be useful.

4
  • Not exactly sure what you're looking for, but it really doesn't sound programming-related. More for SuperUser, since this is a Windows-specific question. Commented Mar 19, 2018 at 9:12
  • 1
    Search for how to execute control panel commands from command prompt. I believe I've seen a way to do it before. Then you can use the run statement in AHK to run the command. Commented Mar 19, 2018 at 19:43
  • @HaveSpacesuit Thanks but I only found commands that can launch a specific Settings interface window and not affect the actual settings from command.
    – elig
    Commented Mar 19, 2018 at 21:46
  • Should this go to the SuperUser SE? I still wonder if there is a way to accomplish this
    – Ahmed
    Commented Feb 19, 2023 at 21:56

2 Answers 2

6

Directly manipulating the appropriate registry settings seems to work. For example:

rem Disable
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount\$$windows.data.bluelightreduction.bluelightreductionstate\Current /v Data /t REG_BINARY /d 0200000088313cdb4584d4010000000043420100d00a02c614dabef0d9dd88a1ea0100 /f
rem Enable
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount\$$windows.data.bluelightreduction.bluelightreductionstate\Current /v Data /t REG_BINARY /d 02000000d3f1d47c4584d40100000000434201001000d00a02c61487dad3e6d788a1ea0100 /f
rem Heavy Reduction
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount\$$windows.data.bluelightreduction.settings\Current /v Data /t REG_BINARY /d 02000000e113e4af4784d4010000000043420100c20a00ca140e0900ca1e0e0700cf28f625ca320e142e2b00ca3c0e052e0e0000 /f
rem Light Reduction
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount\$$windows.data.bluelightreduction.settings\Current /v Data /t REG_BINARY /d 020000006a092c904784d4010000000043420100c20a00ca140e0900ca1e0e0700cf28aa41ca320e142e2b00ca3c0e052e0e0000 /f

Edit: This no longer works since 19H1. This is Microsoft's playground and this is one of their ways in to get you to agree with location tracking (synchronize with sunset).

4
  • This worked for me - after I removed the scheduled start. Having a schedule doesn't stop Windows from manually activating the night light when you use the button from the settings page, but the registry key is different then. The .bluelightreductionstate and .settings key interact in an opaque way.
    – Deebster
    Commented Nov 27, 2018 at 4:32
  • 1
    As per the comments under the selected answer on the same question here: superuser.com/questions/1200222/… This solution does not work anymore. Commented May 4, 2020 at 0:12
  • 1
    doesn't work, i tried command to disable night mode, it still enabled
    – user924
    Commented Jun 18, 2021 at 19:14
  • Doesn't work in Windows 10 22H2
    – Alex
    Commented May 13 at 17:22
-3

You can use start ms-settings:nightlight \nYou can find more here: https://learn.microsoft.com/en-us/windows/uwp/launch-resume/launch-settings-app

1
  • 4
    this only opens the dialog and not apply nightlight setting immediately.
    – elig
    Commented Sep 11, 2018 at 0:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.