Ever wanted to add your own user communication and interaction to a Configuration Manager task sequence? Below is an HTML Application (HTA) that has a user interface for the task sequence with information about the deployment, a button to cancel or pause the deployment and even a button for a desktop support person to get debug information. This first post will cover how to implement a User Experience HTA and how to send messages to it.
A Configuration Manager Task Sequence runs as SYSTEM and therefore anything launched from it will also run in the SYSTEM context . In WinPE, this will be visible to the user and you can simply launch the HTA from the task sequence. However, if you try to run a User Experience HTA from the task sequence, it will be invisible to your user in the Full OS. Fortunately, you can get around this with by launching your user experience application as a package that runs before the task sequence:
1. Download the sample HTA files provided in the link.
2. Create a package in Configuration manager with the files from (1) as the source files (in the exact directory structure, with CopyUE.bat in the root of the package and the UserExperience subfolder)
3. Create a program that runs the CopyUE.bat file included in the download. Use the following properties for the program
<Choose Allow users to interact with this program> and <Run the program as hidden>
4. Right click on the task sequence in Configuration Manager and choose Properties
5. On the Advanced tab choose “Run another program first” and browse to the Package/Program with the HTA
6. In your task sequence scripts add the following header:
<script language=”VBScript” src=”OutputMessage.vbs”/>
7. In your script to output to the user experience screen use the following syntax in Vbscript:
OutputMessage <severity>,<LeftColumnText>, <RightColumnText>
Where <severity> is either “Info”, “Success, “Warning” or “Error”
e.g. OutputMessage “Info”, “Validating machine”, “Please wait while your deployment begins”
8. Copy the OutputMessage.vbs file to the package where your script in (7) is located.
Feel free to try out the HTA and customize it as you please. Stay tuned for the future installments of this post that will talk about how to allow users to cancel a deployment, show debug information or perform other interactions.
This post was contributed by Aly Shivji a consultant with Microsoft Services – U.S. East Region.