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


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.

CopyOEM.zip

Comments (20)
  1. Thanks, I'm old school and prefer the $OEM$ for simplicity sake.  

  2. Anonymous says:

    Thanks.  This was helpful!

  3. Anonymous says:

    …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…

  4. Anonymous says:

    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…   :-/

  5. bobdonkey says:

    This didn’t work for me either using MDT 2013….anyone figure this out?

  6. mikecarter_BOXX says:

    Worked perfectly with MDT 2013. Thank you.

  7. Stefan says:

    If this works…. I will be so happy!

  8. Mark Seymour says:

    Thanks for helping with this headache.

    You mention that you prefer using an explicit XCOPY.  Could you give an example of how you xcopy across.

  9. Donald says:

    "You mention that you prefer using an explicit XCOPY.  Could you give an example of how you xcopy across."

    Yes, please do.

  10. Ventrex says:

    Thanks! Great work!

    It helped me to finaly change the CTRL-ALT-DEL to CTRL-ALT-INSERT for VMWare machines.

    Now I only have to check how to copy specific files with WMI filters 😉

  11. jay says:

    Anyone needed to make any changes for MDT 2013?

    My Task Sequence is failing at this step for some reason.

  12. Highly doubtful, but I haven't tried it.

  13. doesnt work in MDT 2013 =( says:

    My $OEM$-Contents doesnt get copied … 🙁 MDT does also not execute this Job :/

  14. Nathan Hughes says:

    Works fine in MDT 2013 . Just add the script after Applying OS..

  15. K2AAB says:

    This may help for those where it’s failing as it was for me too.
    I had used the $OEM$ at first in the root of the deployment share. However if you have multiple IDs you need to create the $OEM$ folder for each task sequence. ie, deploymentshare\$OEM$ and so on
    Hope this helps

  16. K2AAB says:

    Just seen some of my path got stripped out… Should be \depoymentshare$Controldesktop2$OEM$ where desktop2 is the Sequence ID

  17. showbox says:

    Thanks for the great info. I really loved this. I would like to apprentice at the same time as you amend your web site, how could i subscribe for a blog site?
    For more info on showbox please refer below sites:
    http://showboxandroids.com/showbox-apk/
    http://showboxappandroid.com/
    Latest version of Showbox App download for all android smart phones and tablets.
    http://movieboxappdownloads.com/ – It’s just 2 MB file you can easily get it on your android device without much trouble. Showbox app was well designed application for android to watch movies and TV shows, Cartoons and many more such things on your smartphone.
    For showbox on iOS (iPhone/iPad), please read below articles:
    http://showboxappk.com/showbox-for-ipad-download/
    http://showboxappk.com/showbox-for-iphone/
    Showbox for PC articles:
    http://showboxandroids.com/showbox-for-pc/
    http://showboxappandroid.com/showbox-for-pc-download/
    http://showboxforpcs.com/
    There are countless for PC clients as it is essentially easy to understand, simple to introduce, gives continuous administration, effectively reasonable. it is accessible at completely free of expense i.e., there will be no establishment charges and after establishment
    it doesn’t charge cash for watching films and recordings. Not simply watching, it likewise offers alternative to download recordings and motion pictures. The accompanying are the strides that are to be taken after to introduce Showbox application on Android.
    The above all else thing to be done is, go to the Security Settings on your Android telephone, Scroll down and tap on ‘Obscure sources’.

  18. Jason says:

    It was copying fine for a while but now I am getting the red error at the end as well. The only change I have made is possibly adding folders to the folder that gets copied. I am setting the copy job to continue on error so that it does not break the imaging process.

Comments are closed.