|
ConfigFile = filename
Specifies the configuration file for the installed printer.
|
filename |
Identifies the DLL that configures the printer model installed by the INF file Install section. |
If no ConfigFile statement is used in the Install section (or a Data section it refers to), then the DLL named in a DriverFile statement in the Install section (or a Data section it refers to) is used to configure the printer, and must support the necessary DDI.
DataFile = filename
Specifies the file that contains the mini driver data for the installed printer.
|
filename |
Names the file that contains the printer-specific information for the printer model installed by the INF file Install section. For example, this may be the name of a file that contains minidriver data for the printer or, for PostScript printers, the name of an SPD file. |
If no DataFile statement is used in the Install section or a Data section it refers to, then the name of the Install section is used as the name of the file that contains the printer-specific information.
DataSection = sectionname
|
sectionname |
Specifies a section in the INF file that contains other printer extension statements to be used in normal installation of the printer. |
A Data section in the INF file that contains other printer-specific extension statements to be used when the printer is installed by the INF file Install section.
A DataSection statement is optional in an Install section.
The total list of printer-specific extensions used to install the printer is all the printer-specific statements in the Install section plus all the statements in the Data section. If a key is used in both sections, the value of the key in the Install section is the one that is used in installing the printer.
DefaultDataType = datatype
|
datatype |
Specifies the default data type used by the installed printer. |
To be valid, the value of datatype must be one of the data types enumerated by a print processor already installed on the Windows 95 computer or a print processor installed along with the printer.
If no DefaultDataType statement is used in the Install section or a Data section it refers to then the default datatype value is Raw. Enhanced metafiles (EMFs) are a datatype supported by the default print processor that is installed when Windows 95 is installed. (The default print processor is part of SPOOLSS.DLL.)
DriverFile = filename
Specifies the driver for the installed printer.
|
filename |
Names the file that contains the printer driver for the printer model installed by the Install section. The filename must include an explicit extension; for example, MYPRINTR.DRV. |
If no DriverFile statement is in the Install section or a Data section it refers to, then the Install section name is used as the filename of the driver.
HelpFile = filename
Specifies the help file for the installed printer model.
|
filename |
The name of the help file; for example MYPRINTR.HLP. |
If no HelpFile statement is used in the Install section or a Data section it refers to, then no help file is installed for the printer.
LanguageMonitor = display-name, filename
Specifies a language monitor that supports the installed printer model.
|
display-name |
A user-displayable, descriptive name for the language monitor. This string may not contain commas. |
|
filename |
Names a DLL that is the language monitor that supports the printer model installed by the Install section of the INF file. |
If no LanguageMonitor statement is used in the Install section or a Data section it refers to, then no language monitor is installed for the printer model. In general, language monitors are only useful with bi-directional printers.
It is a good idea to put the display-name string in the [Strings] section of the INF file, along with all the other strings that may be displayed to the user.
NoTestPage = flag
Determines whether or not an option to print a test page is presented to the user as the last step of a successful printer installation.
|
flag |
Can be set to any value. If a NoTestPage statement is in the Install section (or a Data section it refers to) the user will not be given the opportunity to print a test page. The value of the flag parameter adds no extra information to this and is simply a place holder. |
If a VendorSetup or VendorInstaller statement is used in the Install section (or a Data section it refers to), then no test page will be presented, and a NoTestPage statement in either of those two sections is redundant.
NotSelectedTimeout = n
Specifies the duration of the not-selected timeout for the installed printer.
|
n |
The number of seconds in the not-selected timeout period. |
If a NotSelectedTimeout statement is not used in the Install section or a Data section it refers to, then a timeout duration of 45 seconds is used.
PortMonitor = display-name, filename
Specifies a port monitor that supports the installed printer model.
|
display-name |
A user-displayable, descriptive name for the port monitor. This string may not contain commas. |
|
filename |
Names a DLL that is the print monitor that supports the printer model installed by the Install section of the INF file. |
If no PortMonitor statement is used in the Install section or a Data section it refers to, then the default port monitor installed as part of Windows 95 is used to support the installed printer. (The default port monitor is part of SPOOLSS.DLL.)
It is a good idea to put the display-name string in the [Strings] section of the INF file, along with all the other strings that may be displayed to the user, in case displayable strings have to be translated for international markets.
PrintProcessor = display-name, filename
Specifies a print processor that supports the installed printer model.
|
display-name |
A user-displayable, descriptive name for the print processor. This string may not contain commas. |
|
filename |
Names a DLL that is the print processor that supports the printer model installed by the Install section of the INF file. |
If no PrintProcessor statement is used in the Install section or a Data section it refers to, then the default print processor installed as part of Windows 95 is used to support the installed printer. (The default print processor is part of SPOOLSS.DLL).
It is a good idea to put the display-name string in the [Strings] section of the INF file, along with all the other strings that may be displayed to the user, in case displayable strings have to be translated for international markets.
RetryTimeout = n
Specifies the duration of the retry timeout for the installed printer.
|
n |
The number of seconds in the retry timeout period. |
If a RetryTimeout statement is not used in the Install section or a Data section it refers to, then a timeout duration of 15 seconds is used.
VendorInstaller = filename, function-name
(Currently NDPS does nothing with this key)
Names a vendor-provided Win32 DLL that performs the entire printer installation process, and the exported entry-point to call in that DLL. Can only be used for Plug and Play devices.
|
filename |
Name of the vendor-supplied installer DLL. |
|
function-name |
Name of the function exported by the DLL to call to begin the vendor-supplied printer installation process. |
Use of a VendorInstaller statement in the Install section or a Data section it refers to indicates that the printer vendor has a custom printer installation process to be used instead of the normal installation process. Note that a custom printer installation process is only supported for Plug and Play printers, that is, printers that generate a device ID value. The normal installation process must be able to match the generated device ID with a device ID in the INF file before the normal installation process will call the entry-point exported by the vendor-supplied installer DLL.
The vendor-supplied DLL must be a Win32 DLL and the function identified by function-name must have the following prototype:
VOID FAR PASCAL functionname (HWND hWnd,
HINSTANCE hInstance,
LPSTR lpszCmdLine,
int nCmdShow
);
When the normal installation process calls the exported function, lpszCmdLine points to the registry key, relative to HKEY_LOCAL_MACHINE, that has been created by Windows 95 Plug and Play and which contains information about the printer to be installed by the vendor-supplied DLL. The DLL is then responsible for carrying out all aspects of printer installation, except copying files that are specified in INF file sections named in the Install section CopyFiles statement -- the normal installation process carries out the CopyFiles directive before the DLL is called.
In general, the vendor-supplied DLL should add a registry value under the passed-in key named ConfigFlags and set its value to 0 (a DWORD of type REG_BINARY). Then the DLL should call the Win32 print subsystem APIs AddPrinter, AddPrinterDriver, etc. as needed.
If a VendorInstaller statement is used in the Install section (or a Data section it refers to), then Windows 95 will not prompt the user with the opportunity to print a test page at the end of the printer installation.
VendorSetup = filename, function-name
(NDPS 2.0 does support this key, not NDPS 1.0)
Names a vendor-provided Win32 DLL that performs a custom installation step after the normal installation process is successfully completed.
|
filename |
Name of the vendor-supplied DLL that performs the extra installation step. |
|
function-name |
Name of the function exported by the DLL to call to begin the vendor-supplied installation step.
|
Use of a VendorSetup statement in the Install section or a Data section it refers to indicates that the printer vendor has a custom installation step to perform after normal printer installation is successfully completed. Note that the custom installation step DLL will never be called if the normal installation process does not go to successful completion.
The vendor-supplied DLL must be a Win32 DLL and the function identified by function-name must have the following prototype:
VOID FAR PASCAL functionname (HWND hWnd,
HINSTANCE hInstance,
LPSTR lpszCmdLine,
int nCmdShow
);
When the normal installation process calls the exported function, lpszCmdLine points to user-displayable (friendly) name of the printer that has just been installed. The vendor DLL can use that printer name as a parameter in Win32 print subsystem functions to obtain all necessary printer and driver information about the installed printer.
If a VendorSetup statement is used in the Install section (or a Data section it refers to), then Windows 95 will not prompt the user with the opportunity to print a test page at the end of the printer installation.
[Manufacturer] Section
[Manufacturer]
manufacturer-name | %strings-key%=manufacturer-name-section
The [Manufacturer] section identifies the manufacturer of the device and specifies the name of the [Manufacturer Name] section that contains additional information about the device driver.
- manufacturer-name
- Name of the manufacturer. This name can be any combination of printable characters, but must uniquely identify the manufacturer and must be enclosed in double quotation marks.
- strings-key
- Name of a string as defined in a [Strings] section.
- manufacturer-name-section
- Name of the [Manufacturer Name] section. This name can be any combination of printable characters, but must uniquely identify the manufacturer name.
The following example shows a typical [Manufacturer] section in which a string key, %M1%, is used to identify the manufacturer. In this example, the [Manufacturer Name] section is APEXD.
[Manufacturer]
%M1%=APEXD ; Strings key for this manufacturer
[Manufacturer Name] Section
[manufacturer-name]
device-description=install-section-name, device-id[,compatible-device-id]...
The [Manufacturer Name] section gives the device description and identifies the [Install] section for this device. The manufacturer-name-section name must be defined in the [Manufacturer] section.
- device-description
- Description of the device to install. This can be any combination of printable characters or a strings key.
- install-section-name
- Name of the [Install] section for this device.
- device-id
- Identifier for this device.
- compatible-device-id
- Identifier of a compatible device. More than one compatible-device identifier can be given, but each must be preceded by a comma.
The following example shows a typical [Manufacturer Name] section. The name of the [Install] section for this device is SuperSCSI. This device-id is *PNPA000 and its compatible device identifier is *PnPA001.
[APEXD]
%DevDesc1% = SuperSCSI, *PNPA000, *PnPA001
For each driver installed using this INF file, Setup uses the information in these [Manufacturer Name] sections to generate Driver Description, Manufacturer Name, DeviceID, and Compatibility list entries in the Registry.
[Install] Section
Syntax
[install-section-name]
LogConfig = log-config-section-name[,log-config-section-name]...
Copyfiles = file-list-section[,file-list-section]...
Renfiles = file-list-section[,file-list-section]...
Delfiles = file-list-section[,file-list-section]...
UpdateInis = update-ini-section[,update-ini-section]...
UpdateIniFields = update-inifields-section[,update-inifields-section]...
AddReg = add-registry-section[,add-registry-section]...
DelReg = del-registry-section[,del-registry-section]...
Ini2Reg = ini-to-registry-section[,ini-to-registry-section]...
UpdateCfgSys = update-config-section
UpdateAutoBat = update-autoexec-section
Reboot | Restart
The [Install] section identifies the additional sections in the INF file that contain descriptions of the device and instructions for installing files and information needed by the device drivers. The install-section-name must be defined in a [Manufacturer Name] section and consist of printable characters.
Not all entries in this section are needed or required. If an entry is given, it must specify the name of a section. (An exception to this is the CopyFiles entry.) More than one name can be given for each entry, but each additional name must be preceded by a comma. The exact format and meaning of the corresponding entry depends on the entry type and is described in later sections. Each [Install] section should include the creation date of the driver set.
The Reboot or Restart entries can be added to the [Install] section to force the system to either restart or to reboot the machine after performing the commands in the [Install] section.
This example shows a typical [Install] section. It contains a LogConfig entry that identifies two logical configuration sections for this device. It also contains Copyfiles and AddReg entries that identify the sections containing information about which files to install.
[SuperSCSI]
; Apex Drivers Model 01 - SuperSCSI+
Log_Config = With_Dma, WithoutDMA
Copyfiles=MoveMiniPort, @SRSutil.exe
AddReg=MOD1
The CopyFiles entry provides a special notation that allows a single file to be copied directly from the copy line. An individual file can be copied by prefixing the file name with an @ symbol. The destination for any file copied using this notation will be the DefaultDestDir as defined in the [DestinationDirs] section. The following example shows how to copy individual files:
CopyFiles=FileSection1,@myfile.txt,@anotherfile.txt,LastSectionName
CopyFiles Sections
[<CopyFiles-section-name>]
<destination-file-name>[,<source-file-name>][,<temporary-file-name>][,<flag>]
[<destination-file-name>[, <source-file-name>][, <temporary-file-name>]][,<flag>]
.
.
.
Lists the names of files to be copied from a source disk to a destination directory. The source disk and destination directory associated with each file are specified in other sections of the INF file. The file-list-section name must appear in the CopyFiles item of an Install section.
Note that you can specify the copying of a single file in the CopyFiles item of the Install section itself, without building a Copy Files section. To do this, use the special character "@" to force a single file copy. An example of using the "@" character in a CopyFiles-type item is in the Install section reference topic. Copying a single file in this way is somewhat limited because the source and destination filenames must be the same in this case and you cannot use a temporary file.
- destination-file-name
- Name of the destination file. If no source filename is given, this is also the name of the source file.
- source-file-name
- Name of the source file. If the source and destination filenames for the file copy operation are the same, this is not required.
- temporary-file-name
- Name of a temporary file for the file copy operation. The installer copies the source file but gives it the temporary file name. The next time the operating system starts, it renames the temporary file to the destination file name. This is useful for copying files to a destination which is currently open or in use by Windows.
- flag
- Optional parameter used to indicate a file that is critical to the installation process. For those files that the copy operation cannot be skipped during the installation process, set the flag parameter value to 2.
This example copies three files:
[CopyTheseFilesSec]
file11
file21, file22, file23
file23
file31, file32
|
|
; copies file11
; copies file22, temporarily naming it
; copies file32 to file31
|
All the source filenames used in this example must be defined in a SourceDisksFiles section and the logical disk numbers that appear in the SourceDisksFiles section must have been defined in a SourceDisksNames section. As an alternative, you can use a LAYOUT.INF file to supply this information.
See also , ,
[File-List] Section
A [File-List] section lists the names of files to be copied, renamed, or deleted. Entries in this section have three forms, depending on the type of entry in the [Install] section that defines the section name.
A [File-List] section for a CopyFiles entry has this form:
- [file-list-section]
- destination-file-name,[source-file-name],[temporary-file-name]
- The file-list-section name must appear in the CopyFiles entry.
- destination-file-name
- Name of the destination file. If no source filename is given, this is also the name of the source file.
- source-file-name
- Name of the source file. Required only if the source and destination names are not the same.
- temporary-file-name
- Name of the temporary file for the copy. Setup copies the source file but gives it the temporary filename. The next time Windows 95 starts, it renames the temporary file to the destination filename. This is useful for copying files to a destination that is currently open or in use by Windows.
The following example copies three files:
[CopyTheseFilesSec]
file11
file21, file22, file23
file23
file31,file32
|
|
; copies file11
; copies file22, temporarily naming it
; copies file32 to file31
|
A [File-List] section for a RenFiles entry has this form:
[file-list-section]
new-file-name,old-file-name
.
.
.
The file-list-section name must appear in the RenFiles entry.
This example renames the files FILE42, FILE52, and FILE62 to FILE41, FILE51, and FILE61, respectively:
[RenameOldFilesSec]
file41,file42
file51,file52
file61,file62
A [File-List] section for a DelFiles entry has this form:
[file-list-section]
filename
.
.
.
The file-list-section name must appear in the DelFiles entry.
This example deletes three files:
[DeleteOldFilesSec]
file1
file2
file3
In the preceding examples, the given filenames are assumed to have been defined in the [SourceDisksFiles] section and the logical disk numbers that appear in this section have been defined in the [SourceDisksNames] section.
[SourceDisksFiles] Section
Syntax
[SourceDisksFiles]
filename=disk-number
.
.
.
Names the source files used during installation and identifies the source disks that contain the files. The ordinal of the source disk defined in disk-number must be defined in the [SourceDiskNames] section.
This example identifies a single source file, SRS01.386, on the disk having ordinal 1:
[SourceDisksFiles]
SRS01.386 = 1
[SourceDisksNames] Section
Syntax
[SourceDisksNames]
disk-ordinal="disk-description",disk-label,disk-serial-number
Identifies and names the disks used for installation of the given device drivers.
This example identifies one source disk and assigns it ordinal 1. The disk description is given as a strings key:
[SourceDisksNames]
1 = %ID1%, Instd1, 0000-0000
[Strings] Section
[Strings]
strings-key=value
.
.
.
The [Strings] section defines one or more strings keys. A strings key is a name that represents a string of printable characters. Although the [Strings] section is generally the last section in the INF files, a strings key defined in this section may be used anywhere in the INF file that the corresponding string would be used. Setup expands the strings key to the given string and uses it for further processing. Using a strings key requires that it be enclosed in percent signs (%). The [Strings] section makes localization easier by placing all localizable text in the INF file in a single section. Strings keys should be used whenever possible.
- strings-key
- A unique name consisting of letters and digits.
- value
- A string consisting of letters, digits, or other printable characters. It should be enclosed in double quotation marks if the corresponding strings key is used in an entry that requires double quotation marks.
The following example shows the [Strings] section for a sample INF file.
[Strings]
MSFT="Microsoft"
M1="APEX DRIVERS"
DevDesc1=APEX DRIVERS SCSI II Host Adapter
ID1="APEX DRIVERS SuperSCSI Installation disk"
[DestinationDirs] Section
Syntax
file-list-section=ldid[,subdir ]
.
.
.
DefaultDestDir=ldid[,subdir ]
The [DestinationDirs] section defines the destination directories for the given [File-List] sections and optionally defines the default directory for any [File-List] sections that are not explicitly named.
file-list-section
Name of a [File-List] section. This name must have been defined in a Copyfiles, RenFiles, or DelFiles entry in the [Install] section.
ldid
A logical disk identifier (LDID). Can be one of these values:
00 Null LDID; this LDID can be used to create a new LDID
01 Source drive:\ pathname
02 Temporary Setup directory; this is valid only during Windows 95 Setup
03 Uninstall directory
04 Backup directory
10 Windows directory
11 SYSTEM directory
12 IOSUBSYS directory
13 COMMAND directory
14 Control Panel directory
15 Printers directory
16 Workgroup directory
17 INF directory
18 Help directory
19 Administration
20 Fonts
21 Viewers
22 VMN32
23 Color directory
25 Shared directory
26 Winboot
27 Machine specific
28 Host Winboot
30 Root directory of the boot drive
31 Root directory for host drive of a virtual boot drive
32 Old Windows directory if it exists
33 Old MS-DOS directory if it exists
subdir
Name of the directory, within the directory named by ldid, to be the destination directory.
The optional DefaultDestDir entry provides a default destination for any Copyfile entries that use the direct copy notation (@filename) or any [File-List] section not specified in the [DestinationDirs] section. If DefaultDestDir is not given, the default directory is set to LDID_WIN.
This example sets the destination directory for the MoveMiniPort section to the Windows IOSUBSYS directory, and sets the default directory for other sections to be the BIN directory on the boot drive:
| [DestinationDirs] |
| MoveMiniPort=12 | ; Destination for MoveMiniPort Section is |
| | ; windows\iosubsys |
| DefaultDestDirs=30,bin | ; Direct copies go to Boot:\bin |
|