[<add-registry-section>] <reg-root-string>, [<subkey>], [<value-name>], [<flag>], [<value>] [<reg-root-string>, [<subkey>], [<value-name>], [<flag>], [<value>]] . . .
Adds subkeys or value names to the registry, optionally setting the value. The add-registry-section name must appear in an AddReg-type item in an Install section.
reg-root-string
Registry root name. Can be one of these value:
HKCR | Same as HKEY_CLASSES_ROOT |
HKCU | Same as HKEY_CURRENT_USER |
HKLM | Same as HKEY_LOCAL_MACHINE |
HKU | Same as HKEY_USERS. |
HKR | Means relative from the Key passed into GenInstallEx |
subkey
Optional. Identifies the subkey to set. Has the form key1\key2\key3.... This parameter can be expressed as a replaceable string. For example, you could use %Subkey1% where the string to replace %Subkey1% is defined in the Strings section of the INF file.
value-name
Optional. Identifies the value name for the subkey. For string type, if the value-name parameter is left empty, the value of the subkey specified in the subkey parameter is set to a NULL string. Note that the value-name parameter can be expressed as a replaceable string. For example, you could use %Valname1% where the string to replace %Valname1% is defined in the Strings section of the INF file.
flag
Optional. Determines both the value type and whether the registry key is replaced if it already exists. The flag value is a bit map where:
Bit | Value | Meaning |
0 | 0 | (Default) Value is an ANSI string. |
0 | 1 | Value is a hexadecimal number. |
1 | 0 | (Default) Replace key if it exists. |
1 | 1 | Do not replace key if it exists. |
value
Optional. Value to set. Can be either an ANSI string or a number in hexadecimal notation and Intel format. Any item containing a binary value can be extended beyond the 128-byte line maximum by using a backslash (\) character. A string key of the form %strkey% can also be given. The strkey must be defined in the Strings section of the INF file. To use a % character in the line, use %%.
At least two fields are required, however one can be null thus at least one comma is required when using this form.
The two items in the example AddReg-type section below, which is named MOD1, add two value names to the registry, DevLoader and Miniport, if not already present. It also sets the value of these names to IOS and CX2590.MCD.
[MOD1] HKR,,DevLoader,,IOS HKR,,Miniport,,CX2590.MCD