Rediger

Del via


INF DefaultInstall section

Note

If you are building a universal driver package, this section is valid only if it has an architecture decoration, for example [DefaultInstall.NTAMD64].

Note

Using both DefaultInstall and Manufacturer sections in your INF will cause Universal INF validation failures and can lead to inconsistent installation behaviors. See Using a Universal INF File.

An INF file's DefaultInstall section is accessed if a user selects the "Install" menu item after selecting and holding (or right-clicking) on the INF file name. On Windows 10 version 1903 and later versions of Windows, an INF with DefaultInstall can be used in many driver package APIs if it meets the requirements of a primitive driver.

[DefaultInstall] | 
[DefaultInstall.nt] | 
[DefaultInstall.ntx86] | 
[DefaultInstall.ntia64] | (Windows XP and later versions of Windows)
[DefaultInstall.ntamd64] | (Windows XP and later versions of Windows)
[DefaultInstall.ntarm] | (Windows 8 and later versions of Windows)
[DefaultInstall.ntarm64] (Windows 10 version 1709 and later versions of Windows)
 
[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]...]
[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]...] ...

Entries

Not all valid entries are supported in a Universal INF. The following lists which directives are valid in a universal INF and which are not.

Supported in a Universal INF

CopyFiles=@filename | file-list-section[,file-list-section] ...
This optional directive either specifies one named file to be copied from the source medium to the destination, or references one or more INF-writer-defined sections that specify files to be transferred from the source media to the destination.

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, provide 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 versions of Windows.) 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.

For more information, see INF AddReg Directive.

Include=filename1.inf[,filename2.inf]...
This optional entry specifies one or more additional system-supplied INF files that contain 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 follows:

Include= ks.inf,kscaptur.inf,ksfilter.inf

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 that are 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 follows:

Needs= KS.Registration,KSCAPTUR.Registration.NT,MSPCLOCK.Installation

Not supported in a Universal INF

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 computer.

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.

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. For more information, see INF AddReg Directive.

For more information, see INF BitReg 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.

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 specified 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.

Remarks

DefaultInstall sections must not be used for device installations. Use DefaultInstall sections only for the installation of class filter drivers, file system filters, and kernel driver services that are not associated with a device node (devnode).

If using DefaultInstall on Windows 10 version 1903 and later versions of Windows, it is recommended that the INF file meets the requirements of a primitive driver.

Note

The INF file of a driver package that has a Manufacturer section must not contain an INF DefaultInstall section if the driver package is to be digitally signed. For more information about signing driver packages, see Driver Signing.

Note

Unlike a DDInstall section, a DefaultInstall section cannot contain DriverVer or LogConfig directives.

To install a DefaultInstall section from a device installation application, use the following call to InstallHinfSection:

InstallHinfSection(NULL,NULL,TEXT("DefaultInstall 132 path-to-inf\infname.inf"),0); 

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

Examples

The following example shows a typical DefaultInstall section:

[DefaultInstall]
CopyFiles=MyAppWinFiles, MyAppSysFiles, @SRSutil.exe
AddReg=MyAppRegEntries

See also

DDInstall

DriverVer

LogConfig