Patch ConfigMgr 2012 x86 and x64 clients during a task sequence using the PATCH property

In this post, I'm go to show a method to patch the client during a task sequence using the PATCH property in the Setup Windows and Configuration Manager step.

Step 1. Create a folder for a new package. This package will be used to store any hotfixes you would like to deploy during a task sequence. In my lab, I used \\cm12pr1\Sources\Operating System Deployment\CCMHotfixes for my source folder.

image

Step 2. Copy the client hotfixes (.MSP Files) you want to install from the hotfix folder on the site server <InstallDirectory>\hotfix\<KBNumber>\Client into the CCMHotfixes folder.

image

Step 3. Create a package that references the folder you created. You do not need to create any programs for this package.

image

Step 4. Add a run command line step in the task sequence directly before the Setup Windows and Configuration Manager. Ensure you reference the ClientPatches package in this step.

Use the following command line:

cmd /c xcopy *.* %OSDTargetSystemDrive%\windows\CCMHotfixes /E /H /C /I /Q /Y

This command will copy the patches (.MSP Files) to %WinDir%\CCMHotfixes.

image

Step 5. Add the PATCH command in the Setup Windows and ConfigMgr Step. Here’s a few examples:

ConfigMgr 2012 R2 Cumulative Update 5 x64:

PATCH="C:\windows\CCMHotfixes\configmgr2012ac-r2-kb3054451-x64.msp"

ConfigMgr 2012 R2 Cumulative Update 5 x86:

PATCH="C:\windows\CCMHotfixes\configmgr2012ac-r2-kb3054451-i386.msp"

image

You will need to change the filename as appropriate based on the update you are applying. If you add additional patches for a future hotfix, don’t forget to update the distribution point for the ClientPatches package.

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of any included script samples are subject to the terms specified in the Terms of Use