Previous Next

INF DDInstall Section

[install-section-name] |
[install-section-name.nt] |
[install-section-name.ntx86] |
[install-section-name.ntia64]
 
[DriverVer=mm/dd/yyyy[,x.y.v.z] ]
[CopyFiles=@filename | file-list-section[,file-list-section] ...]
[CopyINF=filename1.inf[,filename2.inf]...]
[AddReg=add-registry-section[,add-registry-section]...]
[Include=filename1.inf[,filename2.inf]...]
[Needs=inf-section-name[,inf-section-name]...]
[Delfiles=file-list-section[,file-list-section]...]
[Renfiles=file-list-section[,file-list-section]...]
[DelReg=del-registry-section[,del-registry-section]...]
[BitReg=bit-registry-section[,bit-registry-section]...]
[LogConfig=log-config-section[,log-config-section]...]
[ProfileItems=profile-items-section[,profile-items-section]...]
[UpdateInis=update-ini-section[,update-ini-section]...]
[UpdateIniFields=update-inifields-section[,update-inifields-section]...]
[Ini2Reg=ini-to-registry-section[,ini-to-registry-section]...]
[RegisterDlls=register-dll-section[,register-dll-section]...]
[UnregisterDlls=unregister-dll-section[,unregister-dll-section]...]
[ExcludeID=device-identification-string[,device-identification-string]...] ...
 
 

Each per-Models DDInstall section contains an optional DriverVer directive and one or more directives referencing additional named sections in the INF file, shown here with the most commonly specified INF directives, CopyFiles and AddReg, listed first. The sections referenced by these directives contain instructions for installing driver files and writing any device-specific and/or driver-specific information into the registry.

Directives and Entries

DriverVer=mm/dd/yyyy[,x.y.v.z]
This optional entry specifies version information for the driver package.

For information about how to specify this entry, see INF DriverVer Directive.

CopyFiles=@filename | file-list-section[,file-list-section] ...
This directive either specifies one named file to be copied from the source media to the destination or references one or more INF-writer-defined sections in which device-relevant files on the source media are specified for transfer to the destination. The CopyFiles directive is optional, but is present in most DDInstall sections.

The DefaultDestDir entry in the DestinationDirs section of the INF specifies the destination for any single file to be copied. The SourceDisksNames and SourceDisksFiles sections, or an additional INF specified in the LayoutFile entry of this INF's Version section, provides the location on the distribution media of the driver files.

For more information, see INF CopyFiles Directive.

CopyINF=filename1.inf[,filename2.inf]...]
(Windows XP and later.) This directive causes specified INF files to be copied to the target system.

For more information, see INF CopyINF Directive.

AddReg=add-registry-section[,add-registry-section]...
This directive references one or more INF-writer-defined sections in which new subkeys, possibly with initial value entries, are specified to be written into the registry or in which the value entries of existing keys are modified.

An HKR specification in such an add-registry section designates the ..Class\SetupClassGUID\device-instance-id registry path to the user-accessible driver (a.k.a. "software" key).

For more information, see INF AddReg Directive.

Include=filename.inf[,filename2.inf]...
This optional entry specifies one or more additional system-supplied INF files containing sections needed to install this device and/or driver. If this entry is specified, usually so is a Needs entry.

For example, the system INF files for device drivers that depend on the system's kernel-streaming support specify this entry as
Include= ks.inf[, [kscaptur.inf,] [ksfilter.inf]].

(For further information on the Include entry and restrictions on its use, see Specifying the Source and Target Locations for Device Files).

Needs=inf-section-name[,inf-section-name]...
This optional entry specifies sections within system-supplied INF files that must be processed during the installation of this device. Typically, such a named section is a DDInstall (or DDInstall.xxx) section within one of the INF files listed in an Include entry. However, it can be any section that is referenced within such a DDInstall or DDInstall.xxx section of the included INF.

For example, the INF files for device drivers that have the preceding Include entry specify this entry as
Needs= KS.Registration[, KSCAPTUR.Registration |
    KSCAPTUR.Registration.NT, MSPCLOCK.Installation]

Needs entries cannot be nested. (For further information on the Needs entry and restrictions on its use, see Specifying the Source and Target Locations for Device Files).

DelFiles=file-list-section[,file-list-section]...
This directive references one or more INF-writer-defined sections listing files on the target to be deleted.

For more information, see INF DelFiles Directive.

RenFiles=file-list-section[,file-list-section]...
This directive references one or more INF-writer-defined sections listing files to be renamed on the destination before device-relevant source files are copied to the target machine.

For more information, see INF RenFiles Directive.

DelReg=del-registry-section[,del-registry-section]...
This directive references one or more INF-writer-defined sections in which keys and/or value entries are specified to be removed from the registry during installation of the devices.

Typically, this directive is used to handle upgrades when an INF must clean up old registry entries from a previous installation of this device. An HKR specification in such a delete-registry section designates the ..Class\SetupClassGUID\device-instance-id registry path to the user-accessible driver (a.k.a. "software" key).

For more information, see INF DelReg Directive.

BitReg=bit-registry-section[,bit-registry-section]...
This directive references one or more INF-writer-defined sections in which existing registry value entries of type REG_BINARY are modified. (See also AddReg.) An HKR specification in such a bit-registry section designates the ..Class\SetupClassGUID\device-instance-id registry path to the user-accessible driver (a.k.a. "software" key).

For more information, see INF BitReg Directive.

LogConfig=log-config-section[,log-config-section]...
This directive references one or more INF-writer-defined sections within an INF for a root-enumerated device or for a manually installed device. In these named sections, the INF for such a "detected" or manually installed device specifies one or more logical configurations of bus-relative hardware resources that the device must have to be operational. The INF for such a manually installed device that is not software-configurable also should have a DDInstall.FactDef section.

The LogConfig directive is never used to install PnP devices. However, you can use an INF DDInstall.ConfigOverride section to provide an override configuration for PnP devices.

This directive is irrelevant to all higher level (nondevice) drivers and components.

For more information, see INF LogConfig Directive.

ProfileItems=profile-items-section[,profile-items-section]...
This directive references one or more INF-writer-defined sections that describe items to be added to, or removed from, the Start menu.

This directive is only supported on Windows 2000 and later platforms.

For more information, see INF ProfileItems Directive.

UpdateInis=update-ini-section[,update-ini-section]...
This rarely used directive references one or more INF-writer-defined sections, specifying a source INI file from which a particular section or line within such a section is to be read into a destination INI file of the same name during installation. Optionally, line-by-line modifications to an existing INI file on the destination from a given source INI file of the same name can be specified in the update-ini section.

For more information, see INF UpdateInis Directive.

UpdateIniFields=update-inifields-section[,update-inifields-section]...
This rarely used directive references one or more INF-writer-defined sections in which modifications within the lines of a device-specific INI file are specified.

For more information, see INF UpdateIniFields Directive.

Ini2Reg=ini-to-registry-section[,ini-to-registry-section]...
This rarely used directive references one or more INF-writer-defined sections in which sections or lines from a device-specific INI file, supplied on the source media, are to be moved into the registry.

For more information, see INF Ini2Reg Directive.

RegisterDlls=register-dll-section[,register-dll-section]...
This directive references one or more INF sections used to specify files that are OLE controls and require self-registration.

For more information, see INF RegisterDlls Directive.

UnregisterDlls=unregister-dll-section[,unregister-dll-section]...
This directive references one or more INF sections used to specify files that are OLE controls and require self-unregistration (self-removal).

For more information, see INF UnregisterDlls Directive.

ExcludeID=device-identification-string[,device-identification-string]...
(Windows XP and later.) This directive specifies one or more device identification strings (either hardware IDs or compatible IDs). The DDInstall section will not install devices having device IDs that match any of the hardware IDs or compatible IDs listed.

Comments

Throughout DDK documentation, the term DDInstall is used to refer to an install-section-name, with or without platform extensions. Thus, "DDInstall section" means "a named section within an INF, having the format [install-section-name] or [install-section-name.ntxxx]". When you create names for DDInstall sections, you should include a device-specific prefix, such as [WDMPNPB003_Device] or [GPR400.Install.NT].

Each DDInstall section must be referenced in a device/models-specific entry under the per-manufacturer INF Models section of the INF file.

Except for devices that have no associated files to be transferred from the source media, a dual-OS INF file for a WDM driver must have at least two parallel DDInstall sections for a given device, as follows:

  1. For Windows 9x platforms, provide an undecorated DDInstall section that specifies entries for device installations. There is no DDInstall.Services section in such a dual-OS INF file, because Windows 9x/Me does not store the same information about device/driver services and dependencies in its registry as Windows 2000 and later does. Depending on the device, it can also have either or both of the optional DDInstall.HW and DDInstall.Interfaces sections to install the device/driver on Windows 9x/Me platforms. (It might also have an INF DDInstall.LogConfigOverride section.)
  2. For Windows 2000 and later:

    For more information about how to use the system-defined .nt, .ntx86, and .ntia64 extensions, see Creating INF Files for Multiple Platforms and Operating Systems.

    If a Windows 2000 or later INF file installs drivers, it must have DDInstall.Services sections to specify device/driver registry information to be stored in the registry's ...\CurrentControlSet\Services tree. Depending on the device, it can also have one or more DDInstall.HW, DDInstall.CoInstallers, DDInstall.Interfaces, and/or DDInstall.LogConfigOverride sections.

Each directive in a DDInstall section can reference more than one section name, but each additional named section must be separated from the next with a comma (,). Each such section name must be unique within the INF and must follow the general rules for defining section names. These rules are described in General Syntax Rules for INF Files.

Any AddReg directive specified in a DDInstall section is assumed to reference an add-registry section that cannot be used to store information about upper or lower filter drivers, about multifunction devices, or about driver-independent but device-specific parameters. If a device/driver INF must store this type of information in the registry, it must use an AddReg directive in its undecorated and decorated DDInstall.HW sections, if any, to reference another INF-writer-defined add-registry-section.

A DDInstall section can include a directive named Reboot or Restart. These directives are only for compatibility with Windows 9x. If one of these entries is present the OS is forced to reboot when the device is installed. These directives should never be used for PnP devices. In any case, it is best to let Setup determine whether the machine needs to be rebooted rather than specifying these directives.

Examples

This example shows the expansion of the DDInstall sections, Ser_Inst and Inp_Inst These sections are referenced in the example for the INF Models section.

[Ser_Inst]
CopyFiles=Ser_CopyFiles, mouclass_CopyFiles
 
[Ser_CopyFiles]
sermouse.sys
 
[mouclass_CopyFiles] ; section name referenced by > 1 CopyFiles
mouclass.sys
 
[Inp_Inst]
CopyFiles=Inp_CopyFiles, mouclass_CopyFiles
 
[Inp_CopyFiles]
inport.sys

The following example provides a general illustration of using platform extensions

[Manufacturer]
%MSFT% = Microsoft

[Microsoft]
%Device.DeviceDesc% = DeviceInstall, HWID


[DeviceInstall.NTx86]
;
; This section is used for installations on NT-based x86 systems.
;
...

[DeviceInstall.NTx86.Services]
;
; Services installation for NT-based x86 systems.
;
...

[DeviceInstall.NT]
;
; This section is used for installations on NT-based systems (all other architectures).
;
...

[DeviceInstall.NT.Services]
;
; Services installation for NT-based systems (all other architectures).
;
...

[DeviceInstall]
;
; This section is used for installations on non-NT-based platforms (that is, Win9x/WinME).
;
...

This example shows the DDInstall section in a dual-OS INF file, for installation of a system-supplied WDM driver for an audio device, on an NT-based system. With the exception of the DriverVer directive, this section's entries are identical to the undecorated DDInstall section for installations of the same device on Windows 9x/Me platforms. However, this install-section-name.NT section is necessary in such a dual-OS INF file to set up the install-section-name.NT.Services section that is required to install the device and driver on Windows 2000 and later platforms.

[WDMPNPB003_Device.NT]
DriverVer=01/14/1999,5.0
Include=ks.inf, wdmaudio.inf
Needs=KS.Registration, WDMAUDIO.Registration.NT
LogConfig=SB16.LC1,SB16.LC2,SB16.LC3,SB16.LC4,SB16.LC5 
; a few log-config-sections omitted here for brevity
CopyFiles=MSSB16.CopyList
AddReg=WDM_SB16.AddReg

The following shows the sections referenced by the preceding Needs entry in the system-supplied ks.inf and wdmaudio.inf files specified in the Include entry. When an NT-based system's device installer and/or media class installer process this device's install-section-name.NT section, these next two sections are also processed.

[KS.Registration]
; following AddReg= is actually a single line in the ks.inf file
AddReg=ProxyRegistration,CategoryRegistration,\
  TopologyNodeRegistration,PlugInRegistration,PinNameRegistration,\
  DeviceRegistration 
CopyFiles=KSProxy.Files,KSDriver.Files
 
[WDMAUDIO.Registration.NT]
AddReg=WDM.AddReg
CopyFiles=WDM.CopyFiles.Sys, WDM.CopyFiles.Drv
;
; INF-writer-defined add-registry and file-list sections
; referenced by preceding directives are omitted here for brevity
;

See Also

INF DDInstall.CoInstallers Section
INF DDInstall.FactDef Section
INF DDInstall.HW Section
INF DDInstall.Interfaces Section
INF DDInstall.LogConfigOverride Section
INF DDInstall.Services Section
INF DefaultInstall Section
INF DefaultInstall.Services Section