PC Deployment with SCCM and MDT

Latest News

  • USMTGUI migrates user profiles to Azure AAD
  • SCCM – Installing intrusive Applications…
  • Remove keyboard layout from Windows 10
  • WSUS fail – Reset defunct WSUS
  • network connection check with Powershell
  • Home
  • SCCM Pages
  • Videos
  • Self-study Guides
  • All Posts
  • Tips & tricks
  • About US

Office 2010/2013. How to Include all Updates

Sep 30, 2014 Thomas Ehler Uncategorized 0


How to include all updates for Office 2010/2013 in the installation?

On a newly deployed and fully updated PC, run the script below (Copy the content to a .vbs file).

Then copy all the collected MSP files from %Temp%\Updates to the “\Updates” folder in you Office package and update content on the DP’s.

– And save time and complexity on every installation! 🙂

——-

Dim oMsi,oFso,oWShell

Dim Patches,SumInfo

Dim patch,record,msp

Dim qView

Dim sTargetFolder,sMessage

Const OFFICEID = “000-0000000FF1CE}”

Const PRODUCTCODE_EMPTY = “”

Const MACHINESID = “”

Const MSIINSTALLCONTEXT_MACHINE = 4

Const MSIPATCHSTATE_APPLIED = 1

Const MSIOPENDATABASEMODE_PATCHFILE = 32

Const PID_SUBJECT = 3 ‘Displayname

Const PID_TEMPLATES = 7 ‘PatchTargets

Set oMsi = CreateObject(“WindowsInstaller.Installer”)

Set oFso = CreateObject(“Scripting.FileSystemObject”)

Set oWShell = CreateObject(“Wscript.Shell”)

‘Create the target folder

sTargetFolder = oWShell.ExpandEnvironmentStrings(“%TEMP%”)&”\Updates”

If Not oFso.FolderExists(sTargetFolder) Then oFso.CreateFolder sTargetFolder

sMessage = “Patches are being copied to the %Temp%\Updates folder.” & vbCrLf & “A Windows Explorer window will open after the script has run.”

oWShell.Popup sMessage,20,”Office Patch Collector”

‘Get all applied patches

Set Patches = oMsi.PatchesEx(PRODUCTCODE_EMPTY,MACHINESID,MSIINSTALLCONTEXT_MACHINE,MSIPATCHSTATE_APPLIED)

On Error Resume Next

‘Enum the patches

For Each patch in Patches

   If Not Err = 0 Then Err.Clear

    ‘Connect to the patch file

    Set msp = oMsi.OpenDatabase(patch.PatchProperty(“LocalPackage”),MSIOPENDATABASEMODE_PATCHFILE)

    Set SumInfo = msp.SummaryInformation

    If Err = 0 Then

        If InStr(SumInfo.Property(PID_TEMPLATES),OFFICEID)>0 Then

            ‘Get the original patch name

            Set qView = msp.OpenView(“SELECT `Property`,`Value` FROM MsiPatchMetadata WHERE `Property`=’StdPackageName'”)

            qView.Execute : Set record = qView.Fetch()

            ‘Copy and rename the patch to the original file name

            oFso.CopyFile patch.PatchProperty(“LocalPackage”),sTargetFolder&”\”&record.StringData(2),TRUE

        End If

    End If ‘Err = 0

Next ‘patch

oWShell.Run “explorer /e,”&chr(34)&sTargetFolder&chr(34)

———-


Using WSUS when building MDT reference images. PXE boot menu Forwarder – Windows and Linux

Thomas Ehler

Related articles
  • USMTGUI migrates user profiles to Azure AAD
    USMTGUI migrates user profiles to Azure...

    Jun 11, 2020 0

  • SCCM – Installing intrusive Applications…
    SCCM – Installing intrusive...

    May 29, 2019 0

  • Remove keyboard layout from Windows 10
    Remove keyboard layout from Windows 10

    Apr 09, 2019 0

  • WSUS fail – Reset defunct WSUS
    WSUS fail – Reset defunct WSUS

    Aug 09, 2018 0

More in this category
  • USMTGUI migrates user profiles to Azure AAD
    USMTGUI migrates user profiles to Azure...

    Jun 11, 2020 0

  • SCCM – Installing intrusive Applications…
    SCCM – Installing intrusive...

    May 29, 2019 0

  • Remove keyboard layout from Windows 10
    Remove keyboard layout from Windows 10

    Apr 09, 2019 0

  • WSUS fail – Reset defunct WSUS
    WSUS fail – Reset defunct WSUS

    Aug 09, 2018 0


Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • USMTGUI migrates user profiles to Azure AAD
  • SCCM – Installing intrusive Applications…
  • Remove keyboard layout from Windows 10
  • WSUS fail – Reset defunct WSUS
  • network connection check with Powershell
  • SCCM State Migration Point Creation
  • USMT XML files improved and updated for USMT 10 and Windows 10
  • USMT migration of Edge favourites and Sticky Notes
  • SCCM Task Sequence Reinstall User warning.
  • ConfigMgr-SQL-recommendations.xlsx

Recent Videos

  • Building the Perfect Windows 8.1 Image

    Building the Perfect Windows 8.1 Image

    Mar 13, 2014
  • Master ConfigMgr 2012 R2 with a Limited Budget

    Master ConfigMgr 2012 R2 with a Limited Budget

    Mar 13, 2014
  • #3 SCCM2012 Application Management Part 1

    #3 SCCM2012 Application Management Part 1

    Mar 10, 2014
  • #2 SCCM 2012 Infrastructure Technical Overview

    #2 SCCM 2012 Infrastructure Technical Overview

    Mar 10, 2014
  • #1 SCCM 2012 Technical Overview

    #1 SCCM 2012 Technical Overview

    Mar 10, 2014

Recent comments

  • User State Migration Tool (USMT) Troubleshooting - EhlerTech on USMT – User State Migration Tool Errors
  • Mark H on Upgrade to Windows 10 with SCCM
  • SCCM Deploy – SCCM 2012 Comprehensive guides by Prajwal Desai on Post 1. Setting up VMware AD and SCCM 1511
  • SCCM Deploy – Post 1. Setting up VMware AD and SCCM 1511 on Post 4. Setup SCCM 2012 1511
  • SCCM Deploy – Post 3. DC – Setup DHCP and if needed KMS on Post 4. Setup SCCM 2012 1511
Copyright 2014 / All rights reserved