INI File to Registry

The INI File to Registry section moves lines or sections from an INI file to the registry, creating or replacing a registry entry under the specified key in the registry. The section name ini-to-registry-section must appear in an Ini2Reg item in an Install section of the INF file.

[ini-to-registry-section]
ini-file, ini-section, [ini-key],reg-root-string,subkey[,flags]
.
.
.
 
ini-file
Name of the INI file containing the key to copy. For more information about specifying the INI filename, see the Update Ini File section.
ini-section
Name of the section in the INI file containing the key to copy.
ini-key
Name of the key in the INI file to copy to the registry. If ini-key is empty, the whole section is transferred to the specified registry key.
reg-root-string
Registry root name. This parameter can be one of the following values:
HKCR Same as HKEY_CLASSES_ROOT.
HKCU Same as HKEY_CURRENT_USER.
HKLM Same as HKEY_LOCAL_MACHINE.
HKU Same as HKEY_USERS.
HKR Relative from the key passed into SetupInstallFromInfSection.

subkey
Identifies the subkey to receive the value. Has the form key1\key2\key3...
flags
Indicates whether to delete the INI key after transfer to the registry and whether to overwrite the value in the registry if the registry key already exists. This parameter can be one of the following values.
Bit Value Meaning
0 0 (Default) Do not delete the INI entry from the INI file after moving the information in the entry to the registry.
0 1 Delete the INI entry from the INI file after moving the information in the entry to the registry.
1 0 (Default) If the registry subkey exists, do not replace its current value.
1 1 If the registry subkey exists, replace its current value with the value from the INI file entry.

See Also

Overview, INF File Format Reference