User Experience for Configuration Manager Task Sequences - Part I
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.
Comments
Anonymous
January 01, 2003
In the interest of bettering user experience, this post covers launching an interactive process fromAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
Hi Aly, (I already posted this question but didn't see my comment appear so now trying again after logging in) I like this modification, but could you give some more info on these extra lines that need to be added (step 6-7)? We use SCCM for deployment, using only the default SCCM task to make our TS. So in which scripts do I have to put these lines? thanks for the info. looking forward to trying it.. MaartenAnonymous
January 01, 2003
The comment has been removedAnonymous
January 13, 2009
The comment has been removedAnonymous
December 03, 2009
Can anyone confirm that this works for SCCM 2007 SP2 as well?Anonymous
April 08, 2014
I can't get this to work at all. HTA is not loading, and the lookup to %systemdrive%UserExperienceMessages.xml fails. Did %systemdrive% change in 2007 R2 / PE3 ? I assume this blog was posted for PE2.