Copying Files in MDT 2013

user3838046 picture user3838046 · Jul 14, 2014 · Viewed 14.4k times · Source

I am working to automate deployment of Windows 7 along with several application on some XP laptops.

I am able to silently install the OS and most applications but I am having an issue just copying files (no installation) from my DeploymentShare to the target machine.

I am new to MDT and it seems that, in previous versions, the DeploymentShare/$OEM$ dir could be used to copy files - where $1 signifies C:\ and the directory hierarchy created in the DeploymentShare would be copied to the corresponding directories on the target machine. However, this technique is not working in MDT 2013.

I then tried to copy the files using a Run Command Line task in the Task Sequence. This seems like the simplest way to copy over files.

It is my understanding that %deployroot% within a Media is set as ..\DeploymentShare\ , so I could copy a file from the MDT Media,

C:\DeploymentShare\CopyFiles\fileToCopy.txt

to the target machine,

C:\targetDirectory

with

cmd /c xcopy.exe “%deployroot%\CopyFiles\fileToCopy” “C:\targetDirectory″ 

However, this Run Command Line task gives me the error: Deployment Failed, the system cannot open the file specified.

What is the default path of %deployroot%? How is it set and how can I access files in the DeploymentShare in order to copy them to the target machine?

First post, I hope it is clear.

Answer

user3838046 picture user3838046 · Jul 17, 2014

I was able to copy files over to the target system by adding this script to the Task Sequence to copy the directory structure found in $OEM$ of the DeploymentShare.

I believe older versions of MDT would copy these files over by default. $OEM$ requires a certain directory labeling - where $$ is the Windows directory and $1 is C:\