Examples of Install and Data Section Relationships

It is instructive to look at the two Install sections, [HPPCL5MS.DRV.BIDI] and [HP4ML_V4.SPD], just to see how many of the dozen or so printer keys are used in each one. The [HPLJP_V4.SPD] section is the simplest:

[HP4ML_V4.SPD]
CopyFiles=@HP4ML_V4.SPD,PSCRIPT
DataSection=PSCRIPT_DATA
 

The CopyFiles key is common to all INF file install sections, so the [HP4ML_V4.SPD] section has only one statement with a printer-specific key:

DataSection=PSCRIPT_DATA
 

This statement names the only other section in the INF file that can contain printer-specific keys, the Data section. In fact, the Data section will contain only printer-specific keys, as is shown in the following:

[PSCRIPT_DATA]
DriverFile=PSCRIPT.DRV
HelpFile=PSCRIPT.HLP
LanguageMonitor=%PS_MONITOR%

[Strings]
PS_MONITOR="PostScript Language Monitor,PSMON.DLL"
 

Note that since only four printer-specific keys are used in the Install section for this printer model and in its Data section, defaults are used for the other keys during printer installation. Following is a list of the default values that are used:

ConfigFile=PSCRIPT.DRV      ; default is driver filename
DataFile=HPLJP_V4.SPD       ; default is install section name
DefaultDataType=RAW         ; 
NoTestPage=1                ; prompt user with Test Page opportunity
NotSelectedTimeOut=45       ; measured in seconds
PortMonitor=PORTMON.DLL     ; Microsoft-provided port monitor
PrintProcessor=WINPRINT.DLL ; Microsoft-provided print processor
RetryTimeout=15             ; measured in seconds
VendorInstaller=""          ; no vendor-provided installer
VendorSetup=""              ; no vendor-provided post-installation
                            ; step
 

The other Install section, [HPPCL5MS.DRV.BIDI], also uses a Data section, named [UNIDATA]. The [HPPCL5MS.DRV.BIDI] Install section looks like this:

[HPPCL5MS.DRV.BIDI]
CopyFiles=@HPPCL5MS.DRV,@PJLMON.DLL,UNI,FINSTALL
DataSection=UNI_DATA
DriverFile=HPPCL5MS.DRV
DataFile=HPPCL5MS.DRV
LanguageMonitor=%PJL_MONITOR%

[Strings]
PJL_MONITOR="PJL Language Monitor,PJLMON.DLL"

The Data section [UNI_DATA] contains two printer-specific keys, HelpFile and DefaultDataType.

[UNI_DATA]
HelpFile=UNIDRV.HLP
DefaultDataType=EMF
 

Printer-specific statements can be distributed between an Install section and a Data section any way that is convenient for you, with the exception that if a DataSection key is used it must be used in the Install section. Note that it is not necessary to use a Data section in your printer INF file, even though both of the preceding example Install sections do use a Data section.