The Deployment Guys

Helping to deploy your world automagically...

Automatically Populate the PATCH Property for the ConfigMgr Client Installation - Updated for ConfigMgr 2012

Automatically Populate the PATCH Property for the ConfigMgr Client Installation - Updated for ConfigMgr 2012

  • Comments 6
  • Likes
Update 2013-06-12: The newest version of this script can be found here.

 

Two years ago I posted a script to automatically set the PATCH property used by ccmsetup.exe to install client updates during the Configuration Manager client installation in a task sequence.  That post is found here.  Since Cumulative Update 1 for ConfigMgr 2012 has a client update that is almost a necessity to apply if you installing applications during a task sequence, I needed to update the script.  This is due to the fact that for ConfigMgr 2012 there are now architecture-specific versions of the client (x86 & x64) and therefore architecture-specific updates as well.  The script for ConfigMgr 2007 made the assumption that there were only x86 updates since the ConfigMgr 2007 client was 32-bit only.

Since the updated script works in pretty much the same way as the original one, I will not repeat the details of the implementation that are the same.  If you are not familiar with this, please read the previous post before attempting to use this script.

The major difference between using this solution to install client updates during a task sequence in ConfigMgr 2007 and ConfigMgr 2012 is that ConfigMgr 2007 did most of the work for you in creating a client package that included the updates.  When installing the hotfix on the ConfigMgr 2007 site server, the installer actually placed and client updates directly into subfolders of the hotfix\i386 folder in the client source on the server.  The CU1 update installer for ConfigMgr 2012 does not do this.  It instead creates a Hotfix folder at the same level as the Client folder (under the Configuration Manager installation folder), creates a KB number folder under that (KB2717295 in the case of CU1), and then creates folders for the updates of the individual components under that.

image

 

It then creates individual update packages like this:

image

Unfortunately, these cannot be used to install client updates during a task sequence.  So for ConfigMgr 2012 you will have to manually create a new client package with the updates integrated in the same way that ConfigMgr 2007 would have done for you.

Use the following steps to configure this integrated client package.  I recommend creating a new client package instead of modifying the one that ConfigMgr 2012 creates upon installation.  That way any future automatic changes to that package will not impact this package.

  • Create new client package source folder.
  • Copy the contents of the original client package source folder into this new folder.
  • Under both the i386 and x64 folders, create a hotfix folder.
  • Under each hotfix folder, create a KB number folder for each client  update (KB2717295 in the case of CU1).
  • Copy the MSP files from <Configuration Manager installation folder>\hotfix\<KB number folder>\Client\i386 to the i386\hotfix\<KB number folder> folder in the new client package.  So for the CU1 update and ConfigMgr installed in the default folder, these paths would be C:\Program Files\Microsoft Configuration Manager\hotfix\KB2717295\Client\i386 and i386\hotfix\KB2717295 respectively.
  • Copy the MSP files from <Configuration Manager installation folder>\hotfix\<KB number folder>\Client\x64 to the x64\hotfix\<KB number folder> folder in the new client package.  So for the CU1 update and ConfigMgr installed in the default folder, these paths would be C:\Program Files\Microsoft Configuration Manager\hotfix\KB2717295\Client\x64 and x64\hotfix\KB2717295 respectively.
  • Copy the updated SCCMClientHotfixPath.wsf (in Zip file download below) and ZTIUtility.vbs (from the MDT Scripts) into the root of the new package folder.

The resulting package folder structure should look like this:

 Client Package

Once that is done, use this updated package in the task sequence for the task sequence steps that require it.  Follow Chris Nackers’ great blog post, which shows how to configure this solution.

This version of the script also fixes two other issues with the previous version.  If the machine was configured with more that one partition (perhaps a BDE drive for BitLocker), the script would have the paths to the updates with the incorrect drive letter once the OS was running.  This version changes the drive letter in the paths back to C.  (Thanks to fellow Deployment Guy Dave Hornbaker and MCS Principal Consultant Tomaz Cebul for pointing this out to me a while back.)  This version also reorders the installation of the updates in KB number order, rather than file system order.  (Thanks to blog reader Mark Allcock for commenting about this issue).

While this script has been updated for ConfigMgr 2012, it should still work with ConfigMgr 2007.  I haven't had a chance to test it with ConfigMgr 2007 yet so please post a comment if you have an issue with this.

 

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 included script samples are subject to the terms specified in the Terms of Use.

This post was contributed by Michael Murgolo, a Senior Consultant with Microsoft Services - U.S. East Region.

Attachment: SCCMClientHotfixPath.zip
  • <p>Have you found any creative ways to get set the patch properties for Client Push Installation?</p>

  • <p>Daniel G - Unfortunately, you&#39;ll have to manually specify the PATCH=%path_to_MSP% property in the Client Push Installation properties while using Michael&#39;s recommendations for copying the files to the &quot;hotfix&quot; folder. At the time of writing this, we&#39;re only up to CU2 so at least that&#39;s not too much work right now. Now I cannot remember whether it&#39;s a comma or a semicolon as a separator in the PATCH= property...</p>

  • <p>Last October I posted an update to the script to automatically set the PATCH property used by ccmsetup</p>

  • <p>It appears the script does not recognize the drive letter correctly - sHotFixDrive variable is empty. This results the path to be completely nonsense, as the script is trying to replace an empty value. A snip from the log file:</p> <p>&quot;&lt;![LOG[Successfully copied source folder from C:\_SMSTaskSequence\Packages\G0100003\x64\hotfix to \windows\temp\hotfix]LOG]!&gt;&lt;time=&quot;17:08:41.000+000&quot; date=&quot;06-06-2013&quot; component=&quot;SCCMClientHotfixPath&quot; context=&quot;&quot; type=&quot;1&quot; thread=&quot;&quot; file=&quot;SCCMClientHotfixPath&quot;&gt;</p> <p>&lt;![LOG[Found Update: KB2817245 - C:\Windows\Temp\hotfix\KB2817245\configmgr2012ac-sp1-kb2817245-x64.msp]LOG]!&gt;&lt;time=&quot;17:08:41.000+000&quot; date=&quot;06-06-2013&quot; component=&quot;SCCMClientHotfixPath&quot; context=&quot;&quot; type=&quot;1&quot; thread=&quot;&quot; file=&quot;SCCMClientHotfixPath&quot;&gt;</p> <p>&lt;![LOG[Sorted Update 0: KB2817245 - C:\Windows\Temp\hotfix\KB2817245\configmgr2012ac-sp1-kb2817245-x64.msp]LOG]!&gt;&lt;time=&quot;17:08:41.000+000&quot; date=&quot;06-06-2013&quot; component=&quot;SCCMClientHotfixPath&quot; context=&quot;&quot; type=&quot;1&quot; thread=&quot;&quot; file=&quot;SCCMClientHotfixPath&quot;&gt;</p> <p>&lt;![LOG[Constructed patch paths: C:\Windows\Temp\hotfix\KB2817245\configmgr2012ac-sp1-kb2817245-x64.msp]LOG]!&gt;&lt;time=&quot;17:08:41.000+000&quot; date=&quot;06-06-2013&quot; component=&quot;SCCMClientHotfixPath&quot; context=&quot;&quot; type=&quot;1&quot; thread=&quot;&quot; file=&quot;SCCMClientHotfixPath&quot;&gt;</p> <p>&lt;![LOG[Changed C:\Windows\Temp\hotfix\KB2817245\configmgr2012ac-sp1-kb2817245-x64.msp to C:CC::C:\C:WC:iC:nC:dC:oC:wC:sC:\C:TC:eC:mC:pC:\C:hC:oC:tC:fC:iC:xC:\C:KC:BC:2C:8C:1C:7C:2C:4C:5C:\C:cC:oC:nC:fC:iC:gC:mC:gC:rC:2C:0C:1C:2C:aC:cC:-C:sC:pC:1C:-C:kC:bC:2C:8C:1C:7C:2C:4C:5C:-C:xC:6C:4C:.C:mC:sC:pC:]LOG]!&gt;&lt;time=&quot;17:08:41.000+000&quot; date=&quot;06-06-2013&quot; component=&quot;SCCMClientHotfixPath&quot; context=&quot;&quot; type=&quot;1&quot; thread=&quot;&quot; file=&quot;SCCMClientHotfixPath&quot;&gt;</p> <p>&lt;![LOG[Final SMSClientInstallProperties property value: PATCH=&quot;C:CC::C:\C:WC:iC:nC:dC:oC:wC:sC:\C:TC:eC:mC:pC:\C:hC:oC:tC:fC:iC:xC:\C:KC:BC:2C:8C:1C:7C:2C:4C:5C:\C:cC:oC:nC:fC:iC:gC:mC:gC:rC:2C:0C:1C:2C:aC:cC:-C:sC:pC:1C:-C:kC:bC:2C:8C:1C:7C:2C:4C:5C:-C:xC:6C:4C:.C:mC:sC:pC:&quot; SMSMP=fihelsccm01.guru.dom FSP=fihelsccm01.guru.dom SMSCACHESIZE=20480 CCMLOGLEVEL=0 CCMLOGMAXHISTORY=5]LOG]!&gt;&lt;time=&quot;17:08:41.000+000&quot; date=&quot;06-06-2013&quot; component=&quot;SCCMClientHotfixPath&quot; context=&quot;&quot; type=&quot;1&quot; thread=&quot;&quot; file=&quot;SCCMClientHotfixPath&quot;&gt;</p> <p>&lt;![LOG[Property SMSClientInstallProperties is now = PATCH=&quot;C:CC::C:\C:WC:iC:nC:dC:oC:wC:sC:\C:TC:eC:mC:pC:\C:hC:oC:tC:fC:iC:xC:\C:KC:BC:2C:8C:1C:7C:2C:4C:5C:\C:cC:oC:nC:fC:iC:gC:mC:gC:rC:2C:0C:1C:2C:aC:cC:-C:sC:pC:1C:-C:kC:bC:2C:8C:1C:7C:2C:4C:5C:-C:xC:6C:4C:.C:mC:sC:pC:&quot; SMSMP=fihelsccm01.guru.dom FSP=fihelsccm01.guru.dom SMSCACHESIZE=20480 CCMLOGLEVEL=0 CCMLOGMAXHISTORY=5]LOG]!&gt;&lt;time=&quot;17:08:41.000+000&quot; date=&quot;06-06-2013&quot; component=&quot;SCCMClientHotfixPath&quot; context=&quot;&quot; type=&quot;1&quot; thread=&quot;&quot; file=&quot;SCCMClientHotfixPath&quot;&gt;&quot;</p> <p>Obviously the client install is not successful. Any ideas?</p>

  • <p>Vesa,</p> <p>It appears that you are using the script version from the new post (<a rel="nofollow" target="_new" href="http://blogs.technet.com/b/deploymentguys/archive/2013/06/04/automatically-populate-the-patch-property-for-the-configmgr-client-installation-script-update.aspx">blogs.technet.com/.../automatically-populate-the-patch-property-for-the-configmgr-client-installation-script-update.aspx</a>). &nbsp;From the first line of the log you posted, it looks like the OSDISK variable is not getting set in your task sequence. &nbsp;Did you use an MDT 2012 Update 1 task sequence template to create your task sequence?</p> <p>Michael Murgolo</p>

  • <p>Michael,</p> <p>you are right, it was a self created Build and Capture TS, that didn&#39;t have OSDISK set. I just tested your updated version, and that works perfectly. Thank you!!</p>

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment