The Realm of the Verbal Processor

Jarvis's Ramblings

ConfigMgr Front End HTA

Posted by Jarvis on May 5, 2009

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

Advertisement

17 Responses to “ConfigMgr Front End HTA”

  1. sintaxasn said

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

  2. Jarvis said

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

  3. huythai said

    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
    Huythai

  4. Jarvis said

    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.

  5. huythai said

    thank you.

  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.

    nick
    http://t3chn1ck.wordpress.com

  7. kurt congdon said

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

  8. Jarvis said

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

  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 [...]

  10. jaysjay said

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

    I would like to know that aswell :)

    Thank you

    Cheers

  11. Jarvis said

    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.

  12. eskonr said

    Great! going to test it today on this.

    Eswar
    http://eskonr.wordpress.com

  13. FrWetz said

    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.

  14. Jarvis said

    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.

  15. FrWetz said

    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 sh.run(“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”?

  16. Jarvis said

    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”.

  17. FrWetz said

    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 …

Leave a Reply

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

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

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

Facebook photo

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

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.