Create a Data Image
Published: October 22, 2009
Updated: October 22, 2009
Applies To: Windows 7, Windows Server 2008 R2
|This content applies to Windows 7. For Windows 8 content, see Windows Deployment with the Windows ADK.|
To add applications, files, and other resources to Windows® during an installation, you must create a data image. By using the ImageX tool, you can create additional Windows image (.wim) files that contain only files and applications that you intend to copy to the Windows installation.
Data images enable you to add:
Applications, files, scripts, and other resources to Windows during an installation.
Files, resources, and other data to a partition other than the operating system partition.
|Data images must be used only to add new files to a Windows installation. Do not use data images to replace existing Windows files. Overwriting operating system data is unsupported.|
Previous methods of transferring data to a Windows installation required the use of $OEM$ folders. These folder structures are still supported, but data images provide an easier and more efficient means of transferring additional data to Windows.
In unattended installations, the Windows image to install is specified by the OSImage setting in the Microsoft-Windows-Setup component. You can add one or more DataImage settings in the Microsoft-Windows-Setup component that represent additional data images that you add to the system. For more information, see the Windows® Unattended Setup Reference.
To create a data image
Locate the data that you will create a data image for.
Use ImageX to compress your data files to a .wim file. For example:
imagex /capture C:\Data\DataFiles C:\Data\MyData.wim "MyData"
For more information about using ImageX, see the ImageX Technical Reference.
Copy the data image to an accessible location during Windows Setup. This can be on another partition or on a network share.
To add a data image path to an answer file
Use Windows System Image Manager (Windows SIM) to create an answer file that contains the path to the data image to install and the location to install that data image.
Add the Microsoft-Windows-Setup ImageInstall setting to the windowsPE pass. Configure the DataImage settings as appropriate for your environment.
Save the answer file and close Windows SIM.
The answer file must look similar to the following example:
<settings pass="windowsPE"> <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ImageInstall> <DataImage wcm:action="add"> <InstallTo> <DiskID>0</DiskID> <PartitionID>1</PartitionID> </InstallTo> <InstallFrom> <Credentials> <Domain>Fabrikam</Domain> <Username>MyUsername</Username> <Password>MyPassword</Password> </Credentials> <Path>\\networkshare\share\MyData.wim</Path> </InstallFrom> <Order>1</Order> </DataImage> </ImageInstall> </component> </settings>
Run Setup.exe, specifying the location of the answer file. For example:
All the files and folders specified in the data image are extracted to the root of the drive during installation.