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.

elig
  • 2,635
  • 3
  • 14
  • 24
  • 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. – David Makogon Mar 19 '18 at 09: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. – HaveSpacesuit Mar 19 '18 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 Mar 19 '18 at 21:46
  • Should this go to the SuperUser SE? I still wonder if there is a way to accomplish this – Ahmed Feb 19 '23 at 21:56

2 Answers2

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
PavelXK
  • 92
  • 1
  • 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 Nov 27 '18 at 04:32
  • 1
    As per the comments under the selected answer on the same question here: https://superuser.com/questions/1200222/configure-windows-creators-update-night-light-via-registry?noredirect=1&lq=1 This solution does not work anymore. – metamorphosis May 04 '20 at 00:12
  • 1
    doesn't work, i tried command to disable night mode, it still enabled – user924 Jun 18 '21 at 19:14
-4

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

Chuong Tran
  • 17
  • 2
  • 2