Previous Next

INF DestinationDirs Section

[DestinationDirs]
 

[DefaultDestDir=dirid[,subdir]]
[file-list-section=dirid[,subdir]] ...
 
 

A DestinationDirs section specifies the target destination directory or directories for all copy, delete, and/or rename operations on files referenced by name elsewhere in the INF file.

This section is required in any INF file that uses an INF CopyFiles directive or that references a file-list-section, whether with a CopyFiles, DelFiles, or RenFiles directive.

Entry Values

DefaultDestDir=dirid[,subdir]]
Specifies the default destination directory for all copy, delete, and/or rename operations on files that are not explicitly listed in a file-list-section referenced by other entries here.
file-list-section
Specifies the INF-writer-determined name of a section referenced by a CopyFiles, RenFiles, or DelFiles directive elsewhere in the INF file. Such an entry is optional if this section has a DefaultDestDir entry and all copy-file operations specified in this INF have the same target destination. However, any file-list-section referenced by a RenFiles or DelFiles directive elsewhere in the INF must be listed here.
dirid
Specifies the directory identifier of the target directory for operations on files that are referenced by name, possibly within a named file-list-section of the INF. For lists of commonly-used dirids, see Using Dirids.
subdir
Specifies the subdirectory (and the rest of its path, if any, under the directory identified by dirid) to be the destination of the file operations in the given file-list-section.

Comments

The optional DefaultDestDir entry provides a default destination for copy, rename, and delete file operations that appear elsewhere in the INF file:

Because all WDM drivers must be installed in the %windir%\system32\drivers directory, their dual-OS INF files must specify the dirid value 10 with an explicit subdir path as system32\drivers either as the DefaultDestDir entry, if any, or in the given file-list-section(s) (referenced elsewhere in the INF with the CopyFiles directive) that list the WDM driver images to be copied to the target.

Examples

This example sets the default target directory for all copy-file, delete-file, and rename-file operations. Such a simple DestinationDirs section is common to INF files for new peripheral devices, because such an INF usually just copies a set of source files into a single directory on the target machine.

[DestinationDirs]
DefaultDestDir = 12 ; dirid = \Drivers on WinNT platforms

This example shows a fragment of the DestinationDirs section of the INF for display/video drivers.

[DestinationDirs]
DefaultDestDir     = 11 ; dirid = \system32 on WinNT platforms
 
; ... 
 
; list of per-Manufacturer, per-Models, per-DDInstall-section, and
; CopyFiles-referenced xxx.Miniport/xxx.Display sections omitted here
; along with several other miniport/display paired drivers
; ...
vga.Miniport     = 12
vga.Display      = 11
xga.Miniport     = 12
xga.Display      = 11
 
; all video miniports copied into \system32\drivers on WinNT platforms
; all paired display drivers copied into \system32

See Also

ClassInstall32, CopyFiles, DDInstall, DelFiles, RenFiles, SourceDisksFiles, SourceDisksNames, Version