Jump to content


  • 0
anyweb

How can I display my HTA

Question

To add your HTA to your task sequence, you'll first need a boot image with HTA support. Once you have that the rest is easy.

 

At the beginning of your task sequence create a Run command Line step with the following in it

 

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

 

display the hta.jpg

 

let me explain what is happening in this step...

 

 

The mshta.exe file is like a web browser and displays our HTA (hypertext application).

you'll notice i'm using a path to our HTA which is "%scriptroot%\wnb\Deploymenu.hta" that is because I place the HTA files in a sub directory of my MDT toolkit scripts directory (MDT Toolkit scripts directory=%scriptroot%).

 

This is not possible without a Use Toolkit Package step shortly before this step otherwise the %scriptroot% variable won't be set, so prior to this in my Task Sequence I have a Use Toolkit Package step.

 

use tooolkit package.jpg

 

To copy your HTA file(s) to a sub directory in your MDT Toolkit package, locate the package source in ConfigMgr, find the scripts directory and create a new sub directory called My_Custom_Scripts (or whatever you want) which contains your scripts. In my example the sub directory is called wnb and I place my HTA file and all supporting scripts in there. Don't forget to Update your distribution points for your MDT Toolkit package after copying the new scripts/files.

 

scripts.jpg

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

I have not tried it yet from the Software Center after upgrading to SP1. But i'll check this out and report back.

 

Just by the way. You still need this snippet (down there) of script in your HTA. The command i posted just will make sure that the HTA runs in the same context as the progress bar.

 

Set TSProgressUI = CreateObject("Microsoft.SMS.TsProgressUI")
TSProgressUI.CloseProgressDialog

Share this post


Link to post
Share on other sites

  • 0

OK, i have just checked it out and it runs without any problems. Actually the performance has improved by miles compared to RTM.

 

If you run it from the software center, make sure that the HTA is not hidden behind the other windows. So rather set the property to show in the task bar, or use some script to bring it to front.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.