Skip to content

Read defaults from Windows registry

Tobias Fella requested to merge work/tobias/windows-registry-master into master

Draft: Not entirely tested yet. Immutability, cascading, subgroups, etc. might still be a bit broken.

Replaces !146. In the current iteration, the registry key is not configurable. That can be changed, if desired.

This allows KConfig-based Software to be configured under Windows through Group Policies.

The KConfig values are stored under [HKLM,HKCU]\Software\<OrganizationName>\<ConfigFileName> ("regKey")

Keys below this key are treated as configuration groups. Arbitrary subgroup hierarchies are supported. Values below a registry key corresponding to a certain (sub)group are treated as values in that KConfig group. Values below the regKey key (of this config file) are treated as values of the default group.

To add a key to a (sub)group create a subkey under regKey or an existing (sub)group and add the value in this group with type REG_SZ or REG_EXPAND_SZ.

Immutable groups or values can be suffixed with [$i].

The values are read from HKLM and HKCU and treated as defaults. This means that writing back to the registry through KConfig is not intended or suppported.

Edited by Tobias Fella

Merge request reports