Adapting the [Modem1] and [Modem2] Install-Type Sections of SMPDATA.INF

A listing of the adapted [Models] section from SMPDATA.INF, and the [Modem1] and [Modem2] install-type sections it refers to is shown below:


[Models]
%Modem1% = Modem1, PCMCIA\ZIP-DATAFAX_14.4-77CE
%Modem2% = Modem2, UNIMODEMAC9AF91E
  .
  .
  .
[Modem1]
AddReg=All, MfgAddReg, Modem1.AddReg, PCMCIA

[Modem2]
AddReg=All, MfgAddReg, Modem2.AddReg, EXTERNAL

When you use multiple AddReg-type sections, as shown above, you can use different values for the same registry key in more than one AddReg-type section. The order that AddReg-type section names are listed (from left to right) in the AddReg= item of an install-type section, such as the example install sections [Modem1] and [Modem2], can be critical in such INF files. When different key values are specified in more than one AddReg section, the value in the section listed furthest to the right in the AddReg= line is the value that finally ends up in the registry.

In the above example, the registry keys for Modem1 specified by the sections [All], [MfgAddReg], and [Modem1.AddReg], will be created in exactly the order they are listed from left-to-right in the AddReg= line.

Using the sample [Modem1] section above, first the All section is installed into the registry, next the MfgAddReg section and finally the Modem1.AddReg section. Perhaps the All section contains no command for hardware flow control, the MfgAddReg section contains the command for hardware flow control of &K3, and finally the Modem1.AddReg section contains a hardware flow control command of \Q3. When the installer executes the script given by the AddReg entry, first no flow key is installed from the INF into the registry from the ALL section, next a key value of &K3 from MfgAddReg put into the registry, and finally that value is overwritten with the \Q3 value from Modem1.AddReg section. Note that although the only type of INF sections shown in the above example are AddReg-type sections, install sections may contain directives other than AddReg. For example, here are a couple install sections, named Modem1 and Modem2:


 
[Modem1]
AddReg=All, MfgAddReg, Modem1.AddReg

[Modem2]
AddReg=All, MfgAddReg, Modem2.AddReg
CopyFiles=@sample.vxd


Internal modems which use a VCOMM port driver other than SERIAL.VXD (e.g. "SAMPLE.VXD") will have a CopyFiles line, as shown in the [Modem2] section. This specifies the port driver name, preceded by an "@" character. This file will be copied to the Windows 95 \SYSTEM subdirectory by the Modems control panel because that is the default destination directory for INF files. See the topic "Device Information Files" in the Windows 95 DDK Plug and Play documentation to learn how to change the default destination directory, if necessary. To see examples of using CopyFiles and [DestinationDirs] INF items, see the sample Voice View modem INF file in the MDK, SMPVV.INF.

Note also that all the examples above illustrate that the name of an install section can be anything, but must be a unique section name within the INF file.