You are on page 1of 3

How to run a hta file in the ts

First you need to enable support fot HTA from deployment share properties.

You can create TS of type run command line and provide command line as an ex

mshta.exe "%scriptroot%\wnb\Deploymenu.hta"

refer below link for more help.

https://technet.microsoft.com/en-us/library/dd799244(v=ws.10).aspx

Why is there a $OEM$ directory in the


deployment share for MDT 2013?
I'll add to that... the $OEM$ folder used to be used for various reasons. One major one that I like was
using to be able to place files in the OS image that were not in the pre-captured WIM being used in
the MDT Operating Systems node.
For example, if I wanted to place a directory within the OS, we'll call this directory c:\Dell\_JoeG, and
have this directory contain several files and sub folders... I would copy the files from my local drive to
the $OEM$\$1 directory. When the OS is deployed, MDT basically copies those folders and contents
to the root of the physical drive being deployed to, in this case C:\.
"What is the $1 for?" I'm glad you asked... $1 means copy the contents to the root of the drive... $$1
means copy the contents to ..\Windows directory. For me, this $OEM$ folder was very useful for
wanting to manipulate or massage the Windows image without having to recapture another WIM
image. As an OEM vendor (Dell), it also provides a lot of leeway to be able to add custom contents
(scripts, group policy settings, OS configurations, etc.) to a customer's image without having to re-
engineer the whole process over again. 
This $OEM$ went away with MDT 2012 and beyond... The $OEM$ directory still exist but is not being
used by MDT any longer. You can still use it if you follow Michael Niehaus' Copy $OEM$ Files script,
otherwise it no longer is being used in 2012 on up. 
Resources:
[-] $OEM$ Distribution Folders
[-] $OEM$ Alternative in MDT 2012
EDIT: Sorry, I should have also answered you question... It is not a bug and it should not be deleted.
Also, it is not leftover once your OS Deployment is completed. This directory only resides within the
MDT deployment media and not your OS. 
I would look into using an HTA script. With it you can build a UI with form fields for selection and
validation. You create them using vbscript, html and javascript.

is it possible with MDT to have a task sequence that runs Command Prompt and shows the CMD
window to be able to input variables for batch files or PowerShell scripts to be ran during the task
sequence deployment?

$OEM$ Alternative In MDT 2012 U1


Posted on 14/08/2013by jonconwayuk

So the $OEM$ technique of copying data from a Deployment Share to a machine being
deployed is no more.

As an alternative simply use an XCOPY command in your Task Sequence as per the


example below (Use a ‘Run Command Line’ step) for the CMTrace tool:
1 xcopy.exe "%deployroot%\Custom\CMTrace.exe" "C:\Windows\System32" /Q /H /E /I /Y

 /Q – Does not display file names while copying.


 /H – Copies hidden and system files also.
 /E – Copies directories and subdirectories, including empty ones. Same as /S /E. May be
used to modify /T.
 /I – If destination does not exist and copying more than one file, assumes that
destination must be a directory.
 /Y – Suppresses prompting to confirm you want to overwrite an existing destination file.
how to run a .reg file in MDT task
sequence?
Import it as an application

Full command to run it: REG IMPORT filename.reg

See this website for reference: http://ss64.com/nt/reg.html

You might also like