MetaData
MetaData
specifies the unique data in a Windows image (.wim) file. You can use the MetaData
setting to select a specific data image in a .wim file that matches one or more values specified by the Metadata
setting.
The value for MetaData
must match the value of the Index, the Name, or the Description of the Windows image. For example, rather than specifying an index number, you can select a data image, by using the Name metadata. For example, you can choose to install the data image with the name "FabrikamDriverFiles", by specifying the Key and Value pair for this data image.
When you create a Windows image, you can specify unique metadata for that image. You can view the metadata for a .wim file, by using the imagex /info command. You can update the Name and Description metadata fields of your images, by using the imagex command. For more information, see the ImageX Technical Reference.
The following examples show how the Key and Value settings in Metadata
are combined to describe metadata information.
This is an example of .wim metadata output:
<WIM>
<IMAGE INDEX="1">
<NAME>FabrikamWIM</NAME>
<DESCRIPTION>FabrikamCustomWindowsImage</DESCRIPTION>
</IMAGE>
</WIM>
The following table shows the Key
and Value
pairs that should be used to correspond to the metadata in the sample .wim file output.
Key | Value |
---|---|
/IMAGE/INDEX |
1 |
/IMAGE/NAME |
FabrikamWIM |
/IMAGE/DESCRIPTION |
FabrikamCustomWindowsImage |
For the OSImage setting, If you use the ProductKey setting to specify a product key, the Windows edition that is specified by ProductKey must match the Windows edition specified by the MetaData
setting. If the Windows editions do not match, an error will occur. For example, if you specify a ProductKey setting that is valid for Windows Vista Home edition, and specify the MetaData
setting for Windows Ultimate Edition, an error will occur.
Additionally, if you have multiple Windows images of the same edition, you can use the Metadata
setting to match to a specific Windows image. For example, in a single .wim file, you can include multiple Windows Vista Ultimate editions, each image using different customizations. Windows Setup implicitly uses the product key to select a specific Windows edition in a .wim file. If there are multiple images in a .wim file with no duplicate editions, Windows Setup will implicitly match the correct Windows image based on the Product Key. However, if there are multiple images and several images are of the same edition, and no MetaData
setting is provided, Windows Setup will either display user interface (UI) to enable the user to select which Windows image to install (if WillShowUI is set to OnError), or will fail Setup (if WillShowUI is set to Never) because more than one image matches the installation criteria.
If you have multiple Windows images of the same edition, always specify the MetaData
setting that describes the Windows image that you plan on installing.
Child Elements
Specifies the absolute hierarchical path to a key specified as part of the metadata for an image in a .wim file. |
|
Specifies the value of the |
Valid Passes
Parent Hierarchy
Microsoft-Windows-Setup | ImageInstall | OSImage | InstallFrom | MetaData
Applies To
For the list of the supported Windows editions and architectures that this component supports, see Microsoft-Windows-Setup.
XML Example
The following XML output shows how to set the ImageInstall
setting to install both an operating system image and a data image.
<ImageInstall>
<OSImage>
<InstallFrom>
<Credentials>
<Domain>FabrikamDomain</Domain>
<Password>MyPassword</Password>
<Username>MyUsername</Username>
</Credentials>
<Path>\\networkshare\share\install.wim</Path>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>FabrikamCustomOSImage</Value>
</MetaData>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
<WillShowUI>OnError</WillShowUI>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
</OSImage>
<DataImage wcm:action="add">
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>2</PartitionID>
</InstallTo>
<InstallFrom>
<Credentials>
<Domain>FabrikamDomain</Domain>
<Password>MyPassword</Password>
<Username>MyUsername</Username>
</Credentials>
<Path>\\networkshare\share\data.wim</Path>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>FabrikamData</Value>
</MetaData>
</InstallFrom>
<Order>1</Order>
</DataImage>
</ImageInstall>