Installing ConfigMgr 2012 SP1 CU2 during OSD

One of the most confusing and perplexing issues one can run into during OSD is trying to install a ConfigMgr Client Patch during OSD using the PATCH property.  While many have developed methods that work for them, none of them really work in ALL situations or are ideal to run in locations with slow links.

Running it from a Remote Share for example means your clients are traversing your WAN links to pull down updates.  Depending on how many patches you apply, this could dramatically increase your deployment times.  In addition, if your site is on a slow link, it could impact your WAN link availability if you image many machines.

Other methods like to leverage the %_SMSTSMDataPath% variable as seen here.  The issue I’ve had with this method is that while the value for %_SMSTSMDataPath% stays static, the Drive Letter where your packages are stored can change during the reboot that the Setup Windows and ConfigMgr step initiates.

For example, if you are in WinPE and your system has 1 HDD.  Next, you format the HDD with 2 partitions.  1 Partition for BitLocker, the other the OS.  The first partition will be seen as C: by WinPE, the second will be D: or E: (depending if you have an optical drive or not).

%_SMSTSMDataPath% would be assigned the drive letter of D: or E: (Wherever you OS goes) but after that reboot, your OS drive will be set to C: which is where the Windows OS goes (by default).

The Solution

In order to “fix” this once and for all, I decided to just copy the patch(es) to a static location on the disk as shown below.

First things first, we configure our Format and Partition Disk step to store the Drive Letter to a variable “OSDisk”.

image

Second, we configure our Apply Operating System Image step to apply the OS to a “Logical drive letter stored in a variable”  Here we use the same ‘OSDisk’ variable as above.

image

We then create a new Run Command Line Step immediately before the Setup Windows and ConfigMgr Step in our Task Sequence.  This step will copy the hotfixes from your ConfigMgr Client Package to your local disk. 

image

NOTE: You may need to update the source path according to how you store the hotfixes in the package.

The final step is to append the following string to your Setup Windows and ConfigMgr step:

PATCH="C:\hotfix\configmgr2012ac-sp1-kb2854009-x64.msp"

You can use multiple PATCH statements if needed, but this will apply CU2 for x64 systems.

Lastly, you may want to run another Run Command Line Step to cleanup the C:\hotfix directory once you are all done.

Author: dhedges

I'm a Senior Client Systems Engineer specializing in OS Deployments and Automation using VBScript, PowerShell, MDT and SCCM. I enjoy working with technology and bending it to my will.

18 thoughts on “Installing ConfigMgr 2012 SP1 CU2 during OSD”

  1. Dustin,

    I’ve wrestled with this problem for a long time while looking for a solution that would work in all scenarios. This is brilliantly simple and covers all the corner cases. Great work!

    Nash

  2. Dustin, this is a great article for all SCCM admins who have struggled with hotfixes. In fact, each time I see a CU update, I am hesitant to deploy because of this issues with OSD. Thank you very much for this insight, it certainly helps!

  3. I cant get this to work !
    When the step runs, it errors out with
    \\servername\smspgk$\sms00028
    cmd.exe was starte with the above path as current directory
    UNC paths not supported, defaulting to windows dir
    the system cannot find the path specified

    I have tried the cmd.exe command both with x64\hotfix path, and with a full UNC path.
    Both give same results, what the hell am I missing ?

    Why couldnt Microsoft not just update the client 😦

  4. Hello Guys!

    No need for the “PATCH=” during OS Deployment.
    Simply create the folder “ClientPatch” under the respective architecture x64\ClientPatch and i386\ClientPatch. Copy the MSP file to these folders and update the DP for the SCCM Client.

    During OS Deployment, the CCMSETUP will download and install these patches automatically..
    If you have the MP located on dedicated servers, create the same structure there at SMS\Client\x64\ClientPatch.

    Ref: http://www.m4ttmcg.com/2013/05/sccm-2012-client-push-including.html

  5. I am trying this but the xcopy just sits there and does not do anything. Have you seen this before? Any suggestions?

  6. Checked your command? Check the Package Data source directory to see if it has eg. \\SCCM01.local\SMS_01\hotfix\KBID\Client\x64..

    If this is the case just amend the xcopy to just have “*.*” instead of “x64\*.*”, adjust as per the data source directory.

  7. You mention the following
    In order to “fix” this once and for all, I decided to just copy the patch(es) to a static location on the disk as shown below.

    where is the location – this is a tad confusing to be honest?

    where is the path x64\hotfix\*.* in the cmd /c copy entry? where do you put the files
    if people are to come up with suggestions i wish they would really and fully explain themselves?

  8. Thanks, this worked well for me. I installed the version that came along with SCCM 2012 R2 CU2 update. Only thing I had to do, add a cmd line that created the hotfix directory before I copied the file into it, I would receive a question before that said “is this a file or a folder” and the TS halted.

    Again thanks.

  9. hello, d
    o you really have to apply the client during OSD? what are the benefits compared to just deploy it as a regular package / application once the machine is installed (targetted on a collection containing all computers without this patch, as I suppose you’ll have to do that anyway for your existing machine?)
    just trying to figure out what the best way to do that.
    thanks!

    1. Certain updates contain additional fixes applicable during the OSD process which is why I tend to include the update in my Task Sequence. Not mandatory per se, but I find it is simple to setup and ensures my clients are up to date right away.

  10. Hello Guys,

    Simply follow my suggested solution, posted 13 Janary 2014.
    That works and is an better solution..
    =======================================
    Hello Guys!

    No need for the “PATCH=” during OS Deployment.
    Simply create the folder “ClientPatch” under the respective architecture x64\ClientPatch and i386\ClientPatch. Copy the MSP file to these folders and update the DP for the SCCM Client.

    During OS Deployment, the CCMSETUP will download and install these patches automatically..
    If you have the MP located on dedicated servers, create the same structure there at SMS\Client\x64\ClientPatch.

    Ref: http://www.m4ttmcg.com/2013/05/sccm-2012-client-push-including.html
    =============================================

  11. Hi all, I have been spending a considerable amount of time trying to get R2 CU2 to install in our environment during OSD and the only way that it worked for us was to use the ClientPatch folder method – anything else that we tried just failed. We are using SCCM 2012 R2 CU2 Server, Deploying Windows 8.1 Pro x64 image (build and captured with R2 CU2 client/patch), boot image is WinPE 5.0 x64 and we are applying the x64 version of R2 CU2 via the ClientPatch method as mentioned before.

    However I am now facing another major challenge with this patch – it now breaks the TS once it gets to to the “Setup Windows and ConfigMgr” step during deployment as our machines are not rebooting back into the task sequence to continue the other steps in the TS,

    Any ideas on what might be going on here would be greatly appreciated. I might cross-post this to other places on the internet as well to see what I can find.

Leave a reply to Anders Horgen Cancel reply