[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.
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.
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.
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.
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:
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:
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.
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"