SCCM 2012 SP1 – Launch Mode Not Defined – Binary Patching Example

In SCCM 2007 & 2012 if you created an offline task sequence, you could export the contents to a HDD and run locally.

When you did this you would get message:

Setting Launch Mode To: CD

However from SCCM 2012 SP1 and later that stopped working, and you get error message in smsts.log:

Launch Mode Is Not Defined

The proper method to get this fixed is via a support case from Microsoft.

This is provided just as an example of how such issues can also be patched yourself, of course this will not be supported by vendor. In this case I used IDA Pro (You could also use OllyDbg, which is free)

First I checked the Imports table, and typed GetDriveType, as this was most obvious Windows API to be used in this scenario.

clip_image002

Double clicking GetDriveTypeW brought me to this section, from which I right clicked and chose Jump to xref to operand

clip_image002[6]

We find four references to this function

clip_image002[8]

Selecting the first function it looks like we found what we were looking for, we could see there was a conditional jump (JZ = jump if zero) selecting UFD (The drive type if running TS from USB drive)

image

I selected the jz short loc_426101 line and chose Edit –> Patch Program –> Change Byte

clip_image002[10]

 

I changed the 74 (Opcode for JZ) to EB (opcode for jump short)

clip_image002[12]

 

Now it will always detect itself as running from UFD

image

Finally I wrote the patch back to the file via Edit –> Patch Program –> Apply Patches to input file

clip_image002[15]

Once the task sequence had been exported to the HDD, I then overwrote TsmBootstrap.exe with this version, and it functioned correctly.

About chentiangemalc

specializes in end-user computing technologies. disclaimer 1) use at your own risk. test any solution in your environment. if you do not understand the impact/consequences of what you're doing please stop, and ask advice from somebody who does. 2) views are my own at the time of posting and do not necessarily represent my current view or the view of my employer and family members/relatives. 3) over the years Microsoft/Citrix/VMWare have given me a few free shirts, pens, paper notebooks/etc. despite these gifts i will try to remain unbiased.
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to SCCM 2012 SP1 – Launch Mode Not Defined – Binary Patching Example

  1. Andre says:

    Great info, any chance you could update this for Config Man 2012 R2?

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 )

Google+ photo

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

Connecting to %s