The [AddReg] section, under the [DefaultInstall] section, is required and describes the keys and values that the .cab file adds to the device registry.
[add_registry_section]
registry_root_string , subkey,[value_name], flags, value[,value]
[registry_root_string, subkey,[value_name], flags, value[,value]]
Root string |
Description |
HKCR | The same as HKEY_CLASSES_ROOT |
HKCU | The same as HKEY_CURRENT_USER |
HKLM | The same as HKEY_LOCAL_MACHINE |
Flag |
Value |
Description |
FLG_ADDREG_NOCLOBBER | 0x00000002 | If the registry key exists, do not overwrite it. This flag can be used in combination with any of the other flags in this table. |
FLG_ADDREG_TYPE_SZ | 0x00000000 | The REG_SZ registry data type. |
FLG_ADDREG_TYPE_MULTI_SZ | 0x00010000 | The REG_MULTI_SZ registry data type. The value field that follows can be a list of strings separated by commas. |
FLG_ADDREG_TYPE_BINARY | 0x00000001 | The REG_BINARY registry data type. The value field that follows must be a list of numeric values separated by commas, one byte per field, and must not use the 0x hexadecimal prefix. |
FLG_ADDREG_TYPE_DWORD | 0x00010001 | The REG_DWORD data type. Only the non-compatible format in the Win32 Setup .inf documentation is supported. |
The following code example shows a typical [AddReg] section.
AddReg = RegSettings.All
[RegSettings.All]
HKLM,%reg_path%,,0x00000000,alpha ; <default> = "alpha"
HKLM,%reg_path%,test,0x00010001,3 ; Test = 3
HKLM,%reg_path%\new,another,0x00010001,6 ; New\another = 6