# Path

`Path` specifies the path to the data image to install. This can be either a local or a network path. If the path is local, no credentials are required.

## Values

 Path_to_data_image Specifies the path and the name of the data image to install. Path_to_data_image is a string. Both local paths and Universal Naming Convention (UNC) paths are supported. Relative paths are supported, but the name of the file must be specified. The path is relative to the path from where Windows Setup is run. If the file path cannot be accessed because of an incorrect path or invalid credentials, installation is terminated.

windowsPE

## Applies To

For a list of the Windows editions and architectures that this component supports, see Microsoft-Windows-Setup.

## XML examples

### Network paths

The following XML example shows how to set the `ImageInstall` setting to install both an operating system image and a data image that are stored on a network.

``````<ImageInstall>
<OSImage>
<InstallFrom>
<Credentials>
<Domain>FabrikamDomain</Domain>
</Credentials>
<Path>\\networkshare\share\install.wim</Path>
<Key>/IMAGE/NAME</Key>
<Value>FabrikamCustomOSImage</Value>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
<WillShowUI>OnError</WillShowUI>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
</OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>2</PartitionID>
</InstallTo>
<InstallFrom>
<Credentials>
<Domain>FabrikamDomain</Domain>
</Credentials>
<Path>\\networkshare\share\data.wim</Path>
<Key>/IMAGE/NAME</Key>
<Value>FabrikamData</Value>
</InstallFrom>
<Order>1</Order>
</DataImage>
</ImageInstall>
``````

### Relative paths

In the following XML example, the installer has the Windows installation programs, the Unattend file, and the data image on a USB drive, which is currently assigned to the drive letter E. The technician changes the working directory to E: before running Windows Setup.

``````X:\Windows\System32> E:
``````
``````<ImageInstall>
<DataImage>
<InstallFrom>
<Key>/IMAGE/INDEX</Key>
<Value>1</Value>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>3</PartitionID>
</InstallTo>
</DataImage>
</ImageInstall>
``````

### Absolute paths

You can reference an absolute path to your data image as follows:

`<Path>E:\dataimage.wim</Path>`

If the drive letter where Windows Setup resides is unknown, you can indicate this with the `%configsetroot%` variable. The following XML example shows how to use `%configsetroot%` to reference a local path where the drive letter where Windows Setup resides is unknown.

``````<DataImage wcm:action="add">
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>4</PartitionID>
</InstallTo>
<InstallFrom>
<Path>%configsetroot%\dataimage.wim</Path>
<Key>/IMAGE/INDEX</Key>
<Value>1</Value>
If using `%configsetroot%`, you must also set the value of the Unattend setting Microsoft-Windows-Setup-UseConfigurationSet to `true`.