Stylesheet style.css not found, please contact the developer of "arctic" template.

MS Office Updates

Um MS Office Updates in die Installation zu integrieren, ist es am besten, auf einem Rechner MS Office zu installieren und danach zu aktualisieren. Wenn MS Office auf dem aktuellen Stand ist, wird ein VBScript ausgeführt, was die Updates „heraus zieht“ und in einen separaten Ordner C:\OfficeUpdates kopiert.

Die MSP-Dateien müssen dann in den Ordner \\Softwarerepo\Software\MSOffice\2016\Microsoft Office Professional Plus 2016 64 Bit\updates kopiert werden, so dass diese bei der Installation gleich mit angewendet werden.

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("C:\")&"OfficeUpdates"
If Not oFso.FolderExists(sTargetFolder) Then oFso.CreateFolder sTargetFolder
sMessage = "Die MS Offices Patches werden in den Ordner C:\OfficeUpdates kopiert." 

oWShell.Popup sMessage,20,"Office Updates werden ermittelt..."

'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)
windowsuser/programme/ms_office/updates.txt · Zuletzt geändert: 2020/05/11 15:53 von janaczeck
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0