INF SourceDisksNames Section
[SourceDisksNames] | [SourceDisksNames.x86] | [SourceDisksNames.ia64] | (Windows XP and later versions of Windows) [SourceDisksNames.amd64] (Windows XP and later versions of Windows) diskid = disk-description[,tag-or-cab-file] | diskid = disk-description[,[tag-or-cab-file][,[unused][,path]]] | 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 versions of Windows) ...
A SourceDisksNames section identifies the distribution disks or CD-ROM discs that contain the source files to be transferred to the target computer during installation.
Specifies a nonnegative integer, in decimal format, that identifies a source disk. This value cannot require more than 4 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, and so forth.
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.
This optional value specifies the name of a tag file or cabinet (.cab) 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.
Windows 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 Windows cannot find installation files by name on the installation medium, and if tag-or-cab-file has the extension .cab, Windows uses it as the name of a cabinet file that contains the installation files.
If a .cab extension is specified, Windows treats the file as both a tag file and a cabinet file, as explained in the following Remarks section.
For Windows XP and later versions of Windows, also see the flags and tag-file entry values.
This entry is no longer supported for Windows 2000 and later versions of Windows.
This optional value specifies the directory path on the distribution disk that contains 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 file must reside either in the given path directory or in the installation root.
Starting with Windows XP, setting this to 0x10 forces Windows 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.
Starting with Windows XP, 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 Remarks section.
A SourceDisksNames section can have any number of entries, one for each distribution disk. Any INF with a SourceDisksNames section must also 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 in Windows XP and later versions of Windows.
- 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.
- Attempt to copy installation files directly from the medium.
- Treat the tag-or-cab-file value as a .cab file and look for the file.
- Attempt to copy installation files from the .cab file.
- Prompt the user for files not found.
The second format is supported in Windows XP and later versions of Windows. With this format, 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, Windows uses the following algorithm:
- If the installation medium is removable, look for a tag file that matches the file name that is 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.
- Attempt to copy installation files from the .cab file specified by tag-or-cab-file.
- 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 specify an architecture-specific SourceDisksNames section by adding an .x86, .ia64, or .amd64 extension to SourceDisksNames.
Be aware that, unlike other sections such as a DDInstall section, the platform extensions for a SourceDisksNames section are not .ntx86, .ntia64, or .ntamd64. For example, to specify a source disk names section for an x86-based system, use a SourceDisksNames.x86 section, not a SourceDisksNames.ntx86 section. Similarly, use a SourceDisksNames.ia64 section to specify an Itanium-based system and a SourceDisksNames.amd64 section to specify an x64-based system.
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", the SetupAPI 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 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
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 ; %SystemRoot%\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"