Modifying the AddReg Directive in the DDInstall Section

The AddReg directive lets you specify multiple add-registry-sections, which are used for creating registry subkeys and values. When different registry values are specified in more than one add-registry-section, the value in the section listed furthest to the right in the AddReg line is the value installed in the registry. For more information about the AddReg directive, see INF AddReg Directive.

In the following example from SmpData.inf, the Models section references the Modem1DDInstall section.

[Microsoft]
%Modem1% = Modem1, SERENUM\MSFT5600
%Modem1% = Modem1, *MSFT5600
 .
 .
 .
[Modem1]
AddReg=All, MfgAddReg, Modem1.AddReg, EXTERNAL, 56K.RESP

In the preceding example, the registry entries that are specified for Modem1 by the sections All, MfgAddReg, Modem1.AddReg, EXTERNAL, and 56K.RESPare created in the order that these sections are listed, from left to right on the AddReg line.

  • All
    Creates the registry entries that are required for all modem models installed by the INF file; that is, the registry entries common to all modems, regardless of the manufacturer, described by the INF file.

  • MfgAddReg
    Creates the registry entries that are common to all modems from the manufacturer named in the Manufacturer section.

  • Modem1.AddReg
    Creates the registry entries that are specific to one particular modem.

  • EXTERNAL
    Creates a DeviceType entry that specifies a device type for the device.

  • 56K.RESP
    Creates the registry entries necessary for the operating system to recognize the responses from the modem device and allows it to respond properly.

In this example, the All section is processed first, followed by the MfgAddReg section next, and then the Modem1.AddReg section then followed by EXTERNAL and 56K.RESP. Suppose that the All section does not contain a command for hardware flow control, the MfgAddReg section contains the hardware flow control command &K3, and the Modem1.AddReg section contains the hardware flow control command \Q3.

When the installer processes the add-registry-sections, the installer:

  • Does not write a hardware flow-control entry from the All section.

  • Writes a key value of &K3 from the MfgAddReg section.

  • Overwrites the &K3 value with the \Q3 value from Modem1.AddReg section.

 

 

Send comments about this topic to Microsoft