During a System Center Configuration Manager 2007 Operating System Deployment task sequence a step called Setup Windows and ConfigMgr stages the ConfigMgr client for installation. The task sequence editor for this step provides a field called Installation Properties that allows you to specify Configuration Manager Client Installation Properties. The client installation properties can also be specified using the SMSClientInstallProperties task sequence variable.
Client hotfixes are stored in subfolders of the i386\hotfix folder in the client installation folder similar to the picture below.
When client hotfixes must be installed during the client installation, the PATCH property should be used. The PATCH property must contain a semicolon-separated list of the paths to the hotfix MSP files. Unfortunately, these paths must be specified as fully qualified paths like this example from KB977203:
They cannot be relative paths. This means hard coding the client files package ID (and of course the rest of the path) into the property. Therefore, the property must be updated any time a new hotfix is added or removed. To prevent having to do this maintenance, I created a script called SCCMClientHotfixPath.wsf that will create the PATCH property on the fly during the task sequence.
This script must be used with an MDT-integrated OSD task sequence. When you use this script, do not place the text of the client properties in the Installation Properties field of the Setup Windows and ConfigMgr step. You must instead use the SMSClientInstallProperties variable (either using a Set Task Sequence Variable step or CustomSettings.ini) somewhere before Setup Windows and ConfigMgr step. When you do this, specify the client properties required except the PATCH property. The script will add this property to the SMSClientInstallProperties variable for you.
Copy SCCMClientHotfixPath.wsf and ZTIUtility.vbs (included with MDT in the Scripts folder) to the root of the client files package (i.e. in the same folder as ccmsetup.exe). Then add a Run Command Line step just before the Setup Windows and ConfigMgr step (but after the place where the SMSClientInstallProperties variable is set). Add a reference to the client files package to this step. The command line for this step should be:
When this script runs it does the following tasks:
The only drawback to using this technique is that when using download and execute, the client files package will be downloaded an extra time. My custom preferred this to having to manually maintain the PATCH property in their task sequences.
This post was contributed by Michael Murgolo, a Senior Consultant with Microsoft Services - U.S. East Region.
<p>Another great post by Michael Murgolo over on TechNet for automating the ConfigMgr client PATCH property</p>
<p>I had previously blogged about a script created by Michael Murgolo over on TechNet . I wanted to now</p>
<p>This works fine for me when running in New Computer scenario (F12 to PXE boot and run task sequence). When doing a Refresh scenario and starting the task sequence from an OS, the patches are downloaded to the d: drive and the PATCH property points to d: path. The SCCM client installation task sequence step reboots the computer automatically and installs the SCCM client from c: drive. The d: path where the PATCH property points to is not found. Any suggestions on how to fix this?</p>
<p>You would need to add logic to the script to either detect the conditions when this happens (i.e. partition configuration, etc.) or set a task sequence variable on refresh and then change the drive letter in the PATCH property or move the files so that it's correct when the OS is up and running.</p>
<p>Unfortunately, I don't have the time to solve this problem now. If you find a solution that works for you, post a comment back here.</p>
<p>I've been using this script for a while now and I have to tell you it's saved me so much aggrevation when trying to populate the PATCH property by hand. It’s very dynamic too just in case you install more hotfixes in Configuration Manager.</p>
<p>I have, however, stumbled across a problem with the order in which the hotfixes are detected…</p>
<p>We deploy the following hotfixes to our client systems:</p>
<p>Your script populates the PATCH property in the following order because of the way Windows sorts the hotfix folder structure:</p>
<p>KB2444668, KB977203, KB977384, KB978754, KB979199</p>
<p>CCMSETUP fails to install with an error 1635 and ‘Client.msi.Log’ reports “ERROR: Attempting to install downlevel patch for feature SmsInventory. Rejecting patch and aborting install.”.</p>
<p>Clearly, two hotfixes replace the same SCCM component and the older one (KB979199, I assume) cannot overwrite the newer (KB2444668, I assume). </p>
<p>If I specify the PATCH property in the following order, it works!</p>
<p>KB977203, KB977384, KB978754, KB979199, KB2444668</p>
<p>I know you are limited in your available time, so a colleague and I are going to edit the script to present a logical order to the PATCH property so that recent KB2xxxxxx (7 digit) hotfixes appear nearer the end in their order of release. I will get back to you with results if successful.</p>
<p>Might as well link to the updated community WSF that puts the patches in the correct order...</p>
<p><a rel="nofollow" target="_new" href="http://myitforum.com/cs2/blogs/matbe/archive/2011/09/16/automatically-populate-the-sccm-client-patch-property-during-osd.aspx">myitforum.com/.../automatically-populate-the-sccm-client-patch-property-during-osd.aspx</a></p>
<p>Thanks for the script, it's much better than having to manually specify each hotfix . I found though, that the script is configured to look on the server for all available patches (I had applied a dozen or so patches to the server, some superceded others). This caused me an issue because of the same files being updated by different hotfixes as described by Mark above. I only wanted a few client hotfixes that I had in my client file-set to apply. So I just commented out the four lines below in the script to stop it looking on the server (for the dozen or so hotfixes I had applied):</p>
<p>' ElseIf UCase(oEnvironment.Item("_SMSTSMediaType")) <> UCase("FullMedia") then</p>
<p>' sHotFixFolder = oEnvironment.Item("DeployRoot") & "\hotfix"</p>
<p>' bCopyFolder = True</p>
<p>' oLogging.CreateEntry "Running in ConfigMgr OSD Online, SCCM... hotfixes copied to : " & sHotFixFolder, LogTypeInfo</p>
<p>The script then successfully applied the four hotfixes I had in the client file-set which were, for the record:</p>
<p>KB2750782 (Client-side update is KB2698619) - supersedes KB977384</p>
<p>KB2659258 Asset Intelligence roll-up</p>
<p>KB2815223 Fix for boot image error</p>
<p>KB2509007 Fix for many updates stops Task Sequence</p>