[DDInstall] |
[DDInstall.HW] |
[DDInstall.CoInstallers] |
[ClassInstall32] |
[ClassInstall32.ntx86] |
[ClassInstall32.ntia64]
BitReg=bit-registry-section[,bit-registry-section]...
A BitReg directive references one or more INF-writer-defined sections used to set or clear bits within an existing REG_BINARY-type value entry in the registry. However, this directive is very rarely used in device/driver INF files.
A BitReg directive can be specified under any of the sections shown in the formal syntax statement above. This directive also can be specified under any of the following INF-writer-defined sections:
Eachbit-registry-section name must be unique to the INF file, but it can be referenced by BitReg directives in other sections of the same INF. Each INF-writer-created section name must be unique within the INF and must follow the general rules for defining section names. These rules are described in General Syntax Rules for INF Files. For information about how to use the system-defined .nt, .ntx86, and .ntia64 extensions, see Creating INF Files for Multiple Platforms and Operating Systems.
Each named section referenced by an BitReg directive has the following form:
[bit-registry-section]
reg-root, [subkey], value-entry-name, [flags], byte-mask, byte-to-modify
reg-root, [subkey], value-entry-name, [flags], byte-mask, byte-to-modify
...
A bit-registry-section can have any number of entries, each on a separate line.
| INF Section Containing BitReg Directive | Registry Key Referenced by HKR |
|---|---|
| INF DDInstall section | The device's software key |
| INF DDInstall.HW section | The device's hardware key |
| INF DDInstall.Services section | The Services key |
Note that HKR cannot be used in an bit-registry-section referenced from an INF DefaultInstall section.
For more information about driver information stored under the HKEY_LOCAL_MACHINE root, see Driver Information in the Registry.
The value of an existing REG_BINARY-type value entry also can be modified by simply overwriting its current value within an add-registry section elsewhere in the INF file. For more information about add-registry sections, see the reference for the AddReg directive.
Using a BitReg directive requires the definition of another INF file section. However, the value of an existing REG_BINARY-type value entry can be modified bit-by-bit in such a section, thereby preserving the values of all remaining bits.
These examples show a bit-registry section for a fictional application.
[AppX_BitReg] ; set first bit of byte 0 in ProgramData value entry HKLM,Software\AppX,ProgramData,1,0x01,0 ; preceding would change value 30,00,10 to 31,00,10 ; clear high bit of byte 2 in ProgramData value entry HKLM,Software\AppX,ProgramData,,0x80,2 ; preceding would change value 30,00,f0 to 30,00,70 ; set second and third bits of byte 1 in ProgramData value entry HKLM,Software\AppX,ProgramData,1,0x06,1 ; preceding would change value 30,00,f0 to 30,06,f0
AddInterface, AddReg, AddService, ClassInstall32, DDInstall, DDInstall.CoInstallers, DDInstall.HW, InterfaceInstall32