Copying $OEM$ files and folders with MDT 2012 Update 1

Copying $OEM$ files and folders with MDT 2012 Update 1

Rate This
  • Comments 5

I mentioned in the blog post at http://blogs.technet.com/b/mniehaus/archive/2012/07/21/mdt-2012-update-1-always-applying-images-with-imagex.aspx that MDT 2012 Update 1 no longer uses SETUP.EXE to install Windows 7 and above.  One side effect of this is that $OEM$ folders are no longer going to be copied, since that was something that SETUP.EXE did that the MDT LTIApply.wsf script doesn’t handle.

I’ve never been a big fan of using the $OEM$ folder structure, as it’s just as easy to add explicit XCOPY steps into the task sequence.  But for those of you out there that are using them, you can leverage the attached script (see the attachment link below) in your task sequence to do that.

To set this up, first copy the script into your deployment share.  Then, add a new step to the task sequence right after the “Install Operating System” step to run the script.  It should look like this:

image

Now, it will follow the original MDT logic for locating the appropriate $OEM$ folder to use, checking in this order:

  • %DeployRoot%\Control\%TaskSequenceID%\$OEM$
  • %SourcePath%\$OEM$
  • %DeployRoot%\%Architecture%\$OEM$
  • %DeployRoot%\$OEM$

where %DeployRoot% is the path to the deployment share, %TaskSequenceID% is the ID of the running task sequence (e.g. WIN8), %SourcePath% is the path within the deployment share for the operating system being used, and %Architecture% is either X86 or X64, depending on the boot image being used.  (That’s a bit of a flaw in the original MDT logic since we now support cross-platform deployments – it would choose an X86 $OEM$ folder even if you were deploying an X64 operating system.  That’s probably a good sign that no one is using this option.  Most people use the last one.)

Once it finds a folder, it will look for two folders in that $OEM$ folder and copy them to the appropriate place for the new OS:

  • $1 will be copied to the root of the volume that the new OS image was applied to.
  • $$ will be copied to the Windows folder on the volume that the new OS image was applied to.

The script doesn’t deal with any other folders because it’s too messy to do that from within Windows PE – drive letters aren’t the same as what they would end up being in the full OS.

Attachment: CopyOEM.zip
Leave a Comment
  • Please add 5 and 7 and type the answer here:
  • Post
  • Euhm... ok?

  • Thanks, I'm old school and prefer the $OEM$ for simplicity sake.  

  • Nice and simple, but although my $OEM$ content got copied to the client, I had a 'red' failure at the end of the deploy and in the smsts.log file,

    this:

    Failed to run the action: Run OEM folders Line.

    Incorrect function. (Error: 00000001; Source: Windows) TSManager 19/10/2012 11:53:54 2024 (0x07E8)

    Sending status message . . . TSManager 19/10/2012 11:53:54 2024 (0x07E8)

    ....not sure whats going on...   :-/

  • ...Just discovered that MDT 2012 seems to do it without the script.

    I have a '$1' folder within the $OEM$ folder in my MDT 2012 share and it copies across just fine...no errors at the end of deployment...

  • good post

Page 1 of 1 (5 items)