Previous Next

INF SourceDisksNames Section

[SourceDisksNames] |
[SourceDisksNames.x86] |
[SourceDisksNames.ia64]

 

diskid = disk-description[,[tag-or-cab-file],[unused,path][,flags]] |
diskid = disk-description[,[tag-or-cab-file],[unused,path],[flags][,tag-file]]    Windows XP and later
...
 
 

A SourceDisksNames section identifies the distribution disks or CD-ROM discs that contain the source files to be transferred to the target machine during installation.

Entry Values

diskid
Specifies a nonnegative integer that identifies a source disk. This value can be expressed in decimal or in hexadecimal notation, but it cannot require more than four bytes of storage. If there is more than one source disk for the distribution, each diskid entry in this section must have a unique value, such as 1, 2, 3,... or 0x0, 0x1, 0x2,... and so forth.
disk-description
Specifies a %strkey% token or a "quoted string" that describes the contents and/or purpose of the disk identified by diskid. The installer can display the value of this string to the end user during installation, for example, to identify a source disk to be inserted into a drive at a particular stage of the installation process.

Every %strkey% specification in this section must be defined in the INF's Strings section. Any disk-description that is not a %strkey% token is a user-visible string that must be delimited by double quotation marks characters (") if it has any leading or trailing spaces.

tag-or-cab-file
This optional value specifies the name of a tag file or cabinet file supplied on the distribution disk, either in the installation root or in the subdirectory specified by path, if any. The value should specify only the file name and extension, not any directory or subdirectory.

Setup uses a tag file to verify that the user inserted the correct installation disk. Tag files are required for removable media, and are optional for fixed media.

If Setup cannot find installation files by name on the installation medium, and if tag-or-cab-file has the extension .cab, Setup uses it as the name of a cabinet file containing the installation files.

If a .cab extension is specified, Setup treats the file as both a tag file and a cabinet file, as explained in the following Comments section.

For Windows XP and later, also see the flags and tag-file entry values.

unused
This is not used for Windows 2000 and later. This value is only used in Windows 9x/Me. See the Windows Me DDK documentation for further information.
path
This optional value specifies the path to the directory on the distribution disk containing source files. The path is relative to the installation root and is expressed as \dirname1\dirname2... and so forth. If this value is omitted from an entry, files are assumed to be in the installation root of the distribution disk.

You can use an INF SourceDisksFiles section to specify subdirectories, relative to a given path directory, that contain source files. However, tag files and cabinet files must reside either in the given path directory or in the installation root.

flags
For Windows XP and later, setting this to 0x10 forces Setup to use tag-or-cab-file as a cabinet file name, and to use tag-file as a tag file name. Otherwise, flags is for internal use only.
tag-file
For Windows XP and later, if flags is set to 0x10, this optional value specifies the name of a tag file supplied on the distribution medium, either in the installation root or in the subdirectory specified by path. The value should specify the file name and extension without path information. For more information, see the Comments section.

Comments

A SourceDisksNames section can have any number of entries, one for each distribution disk. Any INF with a SourceDisksNames section also must have an INF SourceDisksFiles section. (By convention, SourceDisksNames and SourceDisksFiles sections follow the INF Version section.)

These sections never appear in system-supplied INF files. Instead, system-supplied INF files specify LayoutFile entries in their Version sections.

Entries in a SourceDisksNames section can have either of two formats, one of which is supported only on Windows XP and later operating system versions.

In the first format, the tag-or-cab-file parameter can specify either a tag file or a cabinet file. When encountering this format, Setup uses the following algorithm:

  1. Treat the tag-or-cab-file value as a tag file name and look for the file on the installation medium. If the medium is removable and the tag file is not found, prompt the user for the correct medium. If the medium is fixed and neither the tag file nor the first file to be installed can be found, prompt the user for the correct medium.
  2. Attempt to copy installation files directly from the medium.
  3. Treat the tag-or-cab-file value as a .cab file and look for the file.
  4. Attempt to copy installation files from the .cab file.
  5. Prompt the user for files not found.

In the second format, which is supported on Windows XP and later, you can use the tag-or-cab-file, flags, and tag-file entries to specify both a .cab file and a tag file. When encountering this format, Setup uses the following algorithm:

  1. If the installation medium is removable, look for a tag file that matches the file name specified by tag-file. If the file is not found, prompt the user for the correct medium. If the medium is fixed, look for either the tag file or the cabinet file. If neither file is found, prompt the user for the correct medium.
  2. Attempt to copy installation files from the .cab file specified by tag-or-cab-file.
  3. Prompt the user for files not found.

For either format, you must provide a different tag file, with a different file name, for each version of the driver files.

To support distribution of driver files on multiple system architectures, you can construct architecture-specific SourceDisksNames sections. During installation, SetupAPI functions look for architecture-specific SourceDisksNames sections before using the generic section. For example, if, during installation on an x86-based platform, an INF file references disk "2", Setup functions will look for an entry for disk "2" in SourceDisksNames.x86 before looking in SourceDisksNames.

SetupAPI functions use the SourceDisksNames and SourceDisksNames.architecture sections that are in the same INF file as the relevant INF SourceDisksFiles section.

Examples

In the following example, the write.exe file is the same for all Windows platforms and is located in the \common subdirectory, under the installation root, on a CD-ROM distribution disc. The cmd.exe file is a platform-specific file that is only used on x86-based platforms.

[SourceDisksNames]
1 = "Windows NT CD-ROM",file.tag,,\common
 
[SourceDisksNames.x86]
2 = "Windows NT CD-ROM",file.tag,,\x86
 
[SourceDisksFiles]
write.exe = 1
cmd.exe = 2
 

This next example again shows the SourceDisksNames section from the example in the reference for the INF Version section.

[SourceDisksNames]
;
; diskid = description[, [tagfile] [, <unused>, subdir]]
;
1 = %Floppy_Description%,,,\Win98
2 = %Floppy_Description%,,,\WinNT
 

The following example uses entries that contain separate specifications for .tag files and .cab files.

[Version]
signature = "$Windows NT$"
Provider = %Msft%

[SourceDisksNames]
1 = "Dajava","Dajava.cab",,,0x10,"Dajava.tag"
2 = "Osc","Osc.cab",,,0x10,"OSC.tag"
3 = "Win","Win.cab",,,0x10,"Win.tag"
4 = "XMLDSO","XMLDSO.cab",,,0x10,"XMLDSO.tag"

[SourceDisksFiles]
ArrayBvr.class=1
BvrCallback.class=1
BvrsToRun.class=1
choice.osc=2
custom.osc=2
login.osc=2
mwcload.exe=3
mwcloadw.exe=3
mwclw32.dll=3
Atom.class=4
DTD.class=4
Entity.class=4
Entry.class=4

[DestinationDirs]
Test = 16430,InfTest    ; %windir%\system32

[DefaultInstall]
CopyFiles = Test

[Test]
ArrayBvr.class
mwcloadw.exe
Entity.class
custom.osc
BvrCallback.class
BvrsToRun.class
choice.osc
login.osc
mwcload.exe
mwclw32.dll
Atom.class
DTD.class
Entry.class

[Strings]
Msft = "Microsoft"

See Also

DestinationDirs, SourceDisksFiles, Version