The Deployment Guys

Helping to deploy your world automagically...

User Experience for Configuration Manager Task Sequences - Part I

User Experience for Configuration Manager Task Sequences - Part I

  • Comments 7
  • Likes

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.

image

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>

UserExperienceProgram

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

image

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.

Attachment: UserExperience.zip
  • Aly,

    looks very interesting. But you lost me in the last 3 steps. You say I need to add these extra lines in my scripts?

    Could you get into a bit more detail about that please?

    what scripts? My TS is made out of the default blocks provided by SCCM and I use no custom scripts. Where should I put that  <script language="VBScript" src="OutputMessage.vbs"/> line? and all the other ones...?

    thanks!

    Maarten

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

    Maarten

  • Maarten,

    I was referring to any custom scripts you plan to add. If you simply want to write to the User Experience you can create a custom script to that just that. For instance:

    1. Add a command-line action in your task sequence to run this custom script.

    Cscript MyCustomScript.wsf

    2. Create the MyCustomScript.wsf and put it in an SCCM Package. Reference that package in the action you added in (1).

    3. Here is sample syntax for MyCustomScript.wsf

    <job id="MyCustomScript">

    <script language="VBScript" src="OutputMessage.vbs"/>

    <script language="vbscript" />

    OutputMessage "Info", "Validating machine", "Please wait while your deployment begins"

    </script>

    </job>

    4. You can replace the message with whatever you like. You can duplicate this script and call a different message during the task sequence.

    Hope that helps,

    Aly

  • In the interest of bettering user experience, this post covers launching an interactive process from

  • Can anyone confirm that this works for SCCM 2007 SP2 as well?

  • This is great but it doesn't work in the full OS. I'm trying to pause the OSD process from starting until a user clicks the "OK" button or 5 minutes elapses. I get this popup box to appears, but then the task sequence just starts on its own without waiting for the program to finish.

  • I can't get this to work at all. HTA is not loading, and the lookup to %systemdrive%\UserExperience\Messages.xml fails. Did %systemdrive% change in 2007 R2 / PE3 ? I assume this blog was posted for PE2.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment