Freigeben über


Displaying the task sequence name

I was talking to some people yesterday at the TechMentor conference in Redmond and about MDT, and somehow during the conversation I got a mental image of the task sequence progress dialog that I couldn’t shake (and that wasn’t really even related to the conversation, go figure).

A while back, we made some changes to the LiteTouch.wsf script and various other places to enable you to specify a “task sequence package name” that would get displayed in the task sequence progress dialog next to the “Running: “ label:

image

Even before that, you could specify an organization name (“My Org Name” in the picture above).  To specify these, you can configure them in CustomSettings.ini:

_SMSTSOrgName=My Org Name
_SMSTSPackageName=My Package Name

That’s great if you want to hard-code the values, but what I wanted was a simple way to set the second one (the “Running” value) to the name of the task sequence that is being executed.  That’s a little harder to do, because the task sequence hasn’t yet been selected when CustomSettings.ini is being processed, and you can’t set these read-only variables once the task sequence has started.

So this is one of those cases where you have to modify one of the MDT scripts, in this case LiteTouch.wsf.  Fortunately, it’s a really trivial change.  Look for this line:

oEnvironment.Item("_SMSTSPackageName") = "Lite Touch Installation"

And change it like so:

oEnvironment.Item("_SMSTSPackageName") = oEnvironment.Item("TaskSequenceName")

That line is only executed if _SMSTSPackageName is blank after CustomSettings.ini has been processed, so it won’t have any effect if you manually configured a value in CustomSettings.ini. 

With that change, you can now see the name of the currently-running task sequence:

image

That’s all there is to it.

Comments

  • Anonymous
    August 23, 2012
    that's really neat thanks!

  • Anonymous
    May 24, 2013
    Another way todo this.: _SMSTSPackageName=Bezig met het uitrollen van %TaskSequenceName% (CustomSettings.ini)

  • Anonymous
    June 01, 2014
    Thanks, good tip.

  • Anonymous
    November 12, 2015
    Another good tip found in this great informative blog.