[DefaultInstall] |
[DefaultInstall.nt] |
[DefaultInstall.ntx86] |
[DefaultInstall.ntia64]
[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]...] ...
An INF file's DefaultInstall section will be accessed if a user selects the "Install" menu item after right-clicking on the INF file name.
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.
For more information, see INF CopyINF Directive.
For more information, see INF AddReg Directive.
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).
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).
For more information, see INF DelFiles Directive.
For more information, see INF RenFiles Directive.
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.
For more information, see INF BitReg Directive.
This directive is only supported on Windows 2000 and later platforms.
For more information, see INF ProfileItems Directive.
For more information, see INF UpdateInis Directive.
For more information, see INF UpdateIniFields Directive.
For more information, see INF Ini2Reg Directive.
For more information, see INF RegisterDlls Directive.
For more information, see INF UnregisterDlls Directive.
DefaultInstall sections are not generally used for device installations. More typically, they are used for the installation of class filter drivers, class co-installers, file system filters, and kernel driver services that are not associated with a device node.
The following example shows a typical DefaultInstall section:
[DefaultInstall] CopyFiles=MyAppWinFiles, MyAppSysFiles, @SRSutil.exe AddReg=MyAppRegEntries
In this example, the DefaultInstall section will be executed if a user selects "Install" after right-clicking on the INF file name.
Note that unlike a DDInstall section, a DefaultInstall section cannot contain DriverVer or LogConfig directives.
Providing a DefaultInstall section is optional. If an INF file does not include a DefaultInstall section, selecting "Install" after right-clicking on the file name causes an error message to be displayed.
To install a DefaultInstall section from a setup application, use the following call to InstallHinfSection (described in Platform SDK documentation):
InstallHinfSection(NULL,NULL,TEXT("DefaultInstall 132 path-to-inf\infname.inf"),0);
For information about how to use the system-defined .nt, .ntx86, and .ntia64 extensions, see Creating INF Files for Multiple Platforms and Operating Systems.