The Deployment Guys

Helping to deploy your world automagically...

Automatically Populate the PATCH Property for the ConfigMgr Client Installation – Script Update

Automatically Populate the PATCH Property for the ConfigMgr Client Installation – Script Update

  • Comments 9
  • Likes

Last October I posted an update to the 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 update was to make the script compatible with ConfigMgr 2012.

Since that time, my colleague Alexey Semibratov pointed out to me that the script did not correctly handle FullMedia deployments correctly.  In that scenario, I had assumed that the script could install the client updates directly off the media.  This assumption will not work if the media drive letter changes after booting into the new OS.

To overcome this, the new version attached below now uses Alexey’s idea to copy the updates to %OSDisk%\windows\temp\hotfix in all scenarios.  The %OSDISK% variable should get set properly in all scenarios when using latest MDT 2012 Update 1 task sequence template.

Follow the October 2012 post for instructions to setup the client package and Chris Nackers’ great blog post for instructions on how to configure this solution.

Update 2013-06-12: In a comment posted to the October 2012 post, a reader had an issue where it appeared that the OSDisk variable did not get set before this script ran.  To try to alleviate this, I have made a small change to the script where it now checks to see if OSDisk has a value and if not, calls a ZTIUtility.vbs function to try to set it.  The updated script (v1.1.3) is now attached below.  This version requires the latest version of ZTIUtility.vbs (from MDT 2012 Update 1 as of this writing).

Update 2013-07-02: Based on Dave’s comment below and some feedback from colleague Stefan Giloj, I’ve posted a script update that includes an additional check to see if the variable OSDTargetSystemDrive has a value if the function oUtility.GetOSTargetDriveLetterEx does not return a value.  The updated script (v1.1.4) is now attached below.  This version also requires the latest version of ZTIUtility.vbs (from MDT 2012 Update 1 as of this writing).

 

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_v1.1.4.zip
  • Hi,

    In my environment i found that the OSDisk is only set for REFRESH scenario and not for bare metal builds. I therefore added a line to look at OSDTargetSystemDrive if OSDisk variable is not set. Since then it's been working great and i have confirmed it is working for Standalone Media too! Thanks! Love it.

  • Hi Dave,

    Did you try version 1.1.3?  That should have solved the issue of OSDisk not being set.  If not, please give it a try and let me know if it works for you.

    Thanks,

    Michael Murgolo

  • In our environment we don't have any client properties specified, therefore the script fails. I have therefore amended this part:

       sSMSClientInstallProperties = oEnvironment.Item("SMSClientInstallProperties")

       If sSMSClientInstallProperties = "" Then

           'oLogging.CreateEntry "SMSClientInstallProperties property not found.", LogTypeError

           'ZTIProcess = Failure

           'Exit Function

    oLogging.CreateEntry "SMSClientInstallProperties property not set.", LogTypeWarning

       End If

  • I know this blog entry is old, nbut I suspect that people are still using it; especially since CU1 got released for Sccm 2012 R2.

    %OSDisk%\Windows\temp\hotfix is not a great choice in the instance of a build and capture task sequence. C:\windows\temp\hotfix doesn't exist at the time the script is run, and if I modify the script to create that path, the Windows setup process renames this new folder "Windows.old" breaking the patch path. I took some bits from the oder versions of this script and put the patch folder back to "DeployRoot"\Hotfix and that seems to work fine for my needs. Maybe I will edit the script so that if "DOCAPTURE" = yes, then I will put the hotfix in there. and leave it out at C:\Windows\temp if that folder exists.

  • Todd,

    Since this script should be run after the OS image has been applied to the disk (after Apply Operating System), the %OSDisk%\Windows folder for the applied OS should exist. Where in the task sequence are you running the script? It should be run before the Setup Windows and ConfigMgr step.

    Michael Murgolo

  • Correct me if I made a mistake here, but this is to be added just before "Setup Windows and ConfigMgr"? When I did, the task sequence produced a 00000001 error. This is the command line step used: http://i.imgur.com/YYk5Vqw.png

  • Fredrik,

    Your step is pointing at the wrong package. It should be pointed at the ConfigMgr Client package that was created for this process.

    Michael Murgolo

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