SourceDisksNames For each distribution floppy disk or CD-ROM, specifies its descriptionand possibly the cabinet file and directory.
SourceDisksFiles Specifies the filename, the source disk ID and optionally the subdirectory and file size. This section can be empty if all the files are in the root directory.
DestinationDirs DefaultDestDir=dirid[,subdir] filelist=dirid[,subdir] Specifies the directory ID, and optionally the subdirectory, for default file copies and file copies in the filelist section. The dirid is a number indicating in which standard location to put the files (see the following).
Manufacturer %manufacturer_name%=models Specifies the manufacturer name and the name of the corresponding models section.
models Specifies a product name, the name of the corresponding install section, a Hardware ID, and zero or more Compatible IDs.
install.Interfaces List of device interfaces to add. Further AddInterface sections can specify more details, such as registry entries to add to the device interface key.
install CopyFiles=@filename | filelist Specifies a file to copy, or the name of the filelist section where the files are listed.
AddReg=addreg Specifies the name of the addreg section.
LogConfig=logconfig For legacy devices, specifies the name of the logconfig section, in which I/O addresses, IRQ configurations, etc., are detailed.
DriverVer mm/dd/yyyy [,a.b.c.d]
ProfileItems List of ProfileItem sections specifying items to add to the Start Menu.
filelist A list of the files to be installed
addreg Add new keys and values.
logconfig Legacy device configurations.
install.AddService ServiceType=1 StartType=start-code ErrorControl=error-control-level ServiceBinary=path-to- driver etc. For W2000 drivers, specifies the driver service details.
Strings

The Strings section defines strings that are substituted wherever else they are used. For example, if the Strings section looks like this:

[Strings]

Msft='Microsoft'

Any instance elsewhere of %Msft% is replaced with Microsoft. Strings are particularly useful for representing GUIDs, but can be used for any type of string, even bit values.

You can internationalize your INF file using strings in two ways. One way is to create a base INF file without any strings in an .inx file, and have a separate .txt file for each locale with the appropriate Strings section. Alternatively, have a common INF file but different Strings sections for each locale, appending .LangIDSubLangID to detail which language and sublanguage applies to this section. LangID and SubLangID are both two digits, as defined in winnt.h. SubLangID 00 is a neutral sublanguage. The following example shows how a different string is defined for UK English.

[Strings]

PrinterName='Abc Color printer'

[Strings.0902]

PrinterName='Abc Colour printer'

INF File Section Hierarchy

The sections in an INF file are arranged in a hierarchy. Table 11.2 shows that the Version, Strings, SourceDisksNames, SourceDisksFiles, and DestinationDirs sections are at the top level.

The Manufacturer section has a list of manufacturers (i.e., a list of manufacturer names and their section names). Table 11.2 has two manufacturers, Abc Inc and Xyz Ltd. Each manufacturer has a section that lists the product models that this INF file describes. Each product model defines various IDs and an installation section base name.

The Models section for Abc, Inc. is called Abc.Inc. This section has entries for each product that it sells. The entry for Product1 specifies that the Product1.Install section contains the main installation instructions. In this case, an optional Product1.Install.Services section has also been included. More optional install sections can be included.

The Product1.Install section has entries that point to yet more sections. The Product1.CopyFiles section lists the files to copy. The Product1.AddReg section lists the entries that must be made in the registry. Further sections at this level can be added for other installation options.

The Product1.Install.Services section is only used in Windows 2000 to specify a service entry.

Table 11.2 INF file section hierarchy

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату
×