The Realm of the Verbal Processor

Jarvis's Ramblings

ConfigMgr Front End HTA

During my session at MMS (and upcoming at TechEd) I used a Front End HTA and a back end VBS during my deployment demo. I mentioned that I would make them available for download (and have gotten multiple requests for this). Hope these help someone else out there!

Front End Script

Back End Script


May 5, 2009 - Posted by | ConfigMgr, MMS, TechEd


  1. Seems the links aren’t working I’m afraid! Cheers, Dan

    Comment by sintaxasn | May 5, 2009

  2. Thanks Dan. I thought I had fixed that in my last edit. It’s fixed now.

    Comment by Jarvis | May 5, 2009

  3. Thanks for the hta. I’m very newbie to this osd thing. i have a quick question. How do you link the front end hta button to your task sequence. Any answere is very helpful.

    Thank again

    Comment by huythai | May 7, 2009

  4. First, I did this using the MDT integration into ConfigMgr. That way I could simply put my HTA in the scripts folder of the MDT toolkit package and call it from there. Once it was there, it was fairly simple to call it in the task sequence.

    When you run the HTA during your task sequence, it does a couple of things. It creates a few custom task sequence variables (used for the role based applications and variables that are used by the back end script for adding the user to the local admin group). It also sets the value of those variables along with setting the value of some build in task sequence variables (i.e. the variable for setting the computer name). There really isn’t anything else that you have to do…the primary function of the HTA is to set task sequence variables that ConfigMgr uses later in the task sequence.

    Comment by Jarvis | May 7, 2009

  5. thank you.

    Comment by huythai | May 7, 2009

  6. Jarvis, thanks for doing a session at MMS! I used your code to learn how to develop HTA (as I hadn’t coded it before) and am now testing what I built from it. Thanks for blessing us with sharing your samples.


    Comment by Nicolas Moseley | May 8, 2009

  7. Jarvis,
    Is there any issue with using HTA’s on x64 boot images?

    Comment by kurt congdon | May 14, 2009

  8. Kurt,
    Not as far as I know, but I haven’t had a need to use the x64 boot image with an HTA.

    Comment by Jarvis | May 15, 2009

  9. […] I wasn’t motivated to find out how others were doing it…Until I saw a demonstration by Jarvis Davis that he presented at MMS […]

    Pingback by HTA BackEnd Script for OSD « t3chn1ck | May 20, 2009

  10. How do you link the front end hta button to your task sequence?

    I would like to know that aswell :)

    Thank you


    Comment by jaysjay | February 17, 2010

  11. The action performed by the button on the front end HTA is to simply set the value of some task sequence variables. There’s nothing to do to link it to the task sequence.

    Comment by Jarvis | February 22, 2010

  12. Great! going to test it today on this.


    Comment by eskonr | August 20, 2010

  13. Hello Jarvis,
    I need to get User input, but I can’t start your (modified) script from a TS. Without SCCM this script runs fine (TS-Variables excluded).
    In a TaskSequence the mshta-Process starts (under system-account) but no hta-script comes up. What the hell i’m doing wrong? How to call hta-script in TS?
    Much thanks for answering.

    Comment by FrWetz | October 4, 2010

  14. Two things to check are where in the TS you are putting the HTA step and if you have the package that contains the HTA file set up correctly (along with the command line for that step in the TS).

    I can’t remember exactly where the HTA step was, but I do remember not being able to have it be the first step in the TS. I think it was 2-4 steps from the top in a standard TS created with the MDT integration into ConfigMgr.

    Comment by Jarvis | October 4, 2010

  15. Ok, but these prerequisites are fullfilled. We got W2K3 SP2, SCCM 4.00.6487.2000 with MDT-Integration, my 3rd entry in TS is (Run Command Line) ‘C:\Windows\system32\mshta.exe “InputBUandCountry.hta” ‘ where the .hta-script is a modified copy of your script. The containing Package is a quite normal Package, not “MDT -> use Toolkit Package”. The deployed OS is Windows 7.

    Additionally I tried it out with a wrapper (a vbs-script which does “call“mshta.exe InputBUandCountry.hta”). In a TaskSequence I don’t get any Program run, which has a GUI …

    How “to setup the package that contains the hta file”?

    Comment by FrWetz | October 5, 2010

  16. as long as your boot image was created with the MDT integration, it has HTA support built in…so you don’t need the “C:\Windows\system32\mshta.exe “. Your command line would just be “InputBUandCountry.hta”.

    Comment by Jarvis | October 5, 2010

  17. I have found two reasons:
    – We are deploying Windows 7, no hta from Network is allowed (perhaps because Group-Policies are active …)
    – in a Tasksequence running in already deployed OS (not the WinPE Bootimage!) you can’t run any Packet with GUI …

    The single advertised packet runs now after local copy and call “C:\Windows\system32\mshta.exe “\InputBUandCountry.hta”

    I’ll try now a hack with “runonce” and transfer InputData via Registry to TaskSequence …

    Comment by FrWetz | October 5, 2010

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: