5

The following are the categories of settings in windows:

enter image description here

Each has their own set of sub settings (sometimes nested too), as shown in the following picture: enter image description here

Whenever I format my computer I change a lot of settings here and the process is tedious and repetitive and I'd like to automate it.

What I want to know is a way to change these settings programmatically (through c++, powershell, cmd batch, whatever).

I'd like a list of the settings and the respective way to change them programmatically, so that I can make a script that would do something similar to the following pseudocode:

Change-Setting --Setting NightLight --Value On -- Strength 60
Change-Setting --Setting Scale --Value 100
Change-Setting --Setting RefreshRate --Value 144.01
...

I've searched for this and there doesn't seem to be a lot of information about this topic (which is suprising, because it seems like it could be something a lot of people would try to automate). I've looked into this post, where it is said to look for regestry changes using ProcMon and then detect which changes were made to the registry when activating a specific setting (which could be more than one) and then use it to change the value myself. After that, a restart to the computer is needed.

This process would take ages, like a really long time to not be worth it. Surely there's an easier way to achieve what I'm trying to?

I'm using windows 11.

5
  • 1
    You can change the majority and likely all settings through a group policy. Why don’t you export the keys associated with those policies and set them with a single registry file?
    – Ramhound
    Commented Jul 26, 2022 at 0:50
  • Specifically, find each item's setting in the Registry, export each key, and combine all the .reg files into one, if desired. Commented Jul 26, 2022 at 16:34
  • I find registry changes by exporting the registry before and again after making changes, I then use the Compare function in Notepad++ to diff the exports. I find it is a little simpler than using Procmon. I would also appreciate "a list of the settings and the respective way to change them programmatically" but I am not sure one exists.
    – DBADon
    Commented Jul 27, 2022 at 15:58
  • Did you find any solution? I am also trying to automate this Commented Nov 13, 2022 at 8:24
  • @MaxProgramming I did not. I kinda gave up on it. If you really want to do that, I recommend syncing the settings in windows, but if you're asking this here, I presume you don't
    – YozNacks
    Commented Nov 14, 2022 at 13:09

0

You must log in to answer this question.

Browse other questions tagged .