Wednesday, June 19, 2013

Workaround for installing Office updates during task sequence

Last week I created a new task sequence used for App-V Sequencer deployment. Therefore I created a new Windows Server 2008 R2 image without updates, and installed them later by offline servicing the reference image. The total number of updates that were succesfully applied on the mounted image was 134 in total. Because of MS Office 2010 installation, it was needed to deploy additional Office updates during the task sequence installation also. Because installing software updates during deployment isn't that easy, I used a script for that. Let's have a look at it now.

Create a new file on your ConfigMgr server named OfficeUpdates.vbs and copy beneath content in it.

Const ForAppending = 8
Set oFSO = CreateObject ("Scripting.FileSystemObject")
Set oLogFile = oFSO.OpenTextFile ("C:\ConfigOfficeUpdates.txt", ForAppending, True)
oLogFile.WriteLine "Starting execution of VBScript to configure Office to use Microsoft Updates"
Set ServiceManager = CreateObject("Microsoft.Update.ServiceManager")
ServiceManager.ClientApplicationID = "My App"


' add the Microsoft Update Service by GUID
Set NewUpdateService = ServiceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"")
oLogFile.WriteLine "Script completed successfully"
wscript.Quit(oLogFile.Close)


Create a new package of the above file, without a program, and place it on your Distribution Point. Now add a Run Command Line step in your task sequence, with command "cscript OfficeUpdates.vbs" and select the new package created. Trick is to install MS Office 2010 first, then run the above script, and use a default "Install Software Updates" step after that, selecting "All Software Updates". When you change order, it won't be functional. Because of running the above script, Office updates will be installed only!

After using this script 38 Office updates were installed successfully in my environment! Love it :-)

Source: Workaround for Installing Office Updates During an Image Build

4 comments:

  1. Question: Why not use the Update folder under the Office source folder? That seems to be the easy way of keeping your Office installation updated.

    ReplyDelete
    Replies
    1. Yes, that's true indeed. With above script all (new) updates will be installed also. No need to update DP every time.. Both ways will do I think.

      Delete
  2. +1 on anonymous but also the existing install software updates tasksequence installs Office updates just fine (if they are part of your existing update target scope)

    ReplyDelete
    Replies
    1. Yes, you're right on that one. Benefit of above solution is there's no need to target any updates at all. Otherwise it will be functional only when targeting updates to a specific collection. This is not needed this way..

      Delete