OS Deployment – Change Boot Media During a Running Task Sequence

We still have a couple hundred Windows XP computers which need to be upgraded to a supported operating system. For anyone that’s used ConfigMgr 2012/CB, you’ll know that you need to use the WinPE 3.1 Boot Media in order for Windows XP to properly stage the boot.wim otherwise you will get an error and an unbootable system.

But this presents a problem. It means that you’ll need to maintain at least 2 task sequences: one that boots on Windows XP, and one that boots on everything else.

But I think we can do better! Let make one task sequence to rule them all!

So how can we do this?

I started with a couple of pieces of knowledge:

  1. _SMSTSBootImageID is the task sequence variable that identifies which boot image is assigned to the task sequence. (https://technet.microsoft.com/en-us/library/hh273375.aspx)
  2. TSEnv2.exe is a free tool from 1E that allows you to change task sequence variables (even read only task sequence variables!) at run time. (http://info.1e.com/website-freetools-1e-tsenv2)

So I tried the obvious. I created a package with TSEnv2.exe, and during a test task I added a command line step to run:

x86\TSEnv2.exe set _SMSTSBootImageID=AAAXXXXX

Where AAAXXXXX is your boot image Package ID of your WinPE 3.1 Media.

While a step in the right direction, this failed spectacularly.

Next thing I tried was to assign the WinPE 3.1 Media to the same task sequence. While the task sequence was running, I launched CMD as SYSTEM and ran the TSEnv2.exe list > c:\TSEnv2.txt to dump the variables to a text file. I then did a search for all references of AAAXXXXX. While there were search results to that Package ID, there were a couple more lines struck me:


These both referenced the download URL of the boot image.

I added two more command line steps to run:

x86\TSEnv2.exe set _SMSTSHTTPAAAXXXXX=https://dpserver.local/SMS_DP_SMSPKG$/AAAXXXXX,https://dpserver.local/NOCERT_SMS_DP_SMSPKG$/AAAXXXXX
x86\TSEnv2.exe set _SMSTSAAAXXXXX=http://dpserver.local/SMS_DP_SMSPKG$/AAAXXXXX,https://dpserver.local/NOCERT_SMS_DP_SMSPKG$/AAAXXXXX

So now I put these three command line steps within a group that only runs under Windows XP, and boom! The task sequence will change the boot image! Only one task sequence now 🙂

One thought on “OS Deployment – Change Boot Media During a Running Task Sequence

  1. I was about to make similar changes for one of my TS.

    Good to know that it worked for you before I tried it.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s