====== Microsoft Office 365 ====== //Christian Streifer, based on Office 2016 Code by Author Dominik Daehn, based on Office 2013 Code by Jens Eppler, based on Office 2010 Code by Soren Birk // ===== Anleitung / Description ===== ==== Deutsch ==== Die Setup.exe ist das [[https://www.microsoft.com/en-us/download/details.aspx?id=49117|Office Deployment Tool]] , das Skript beinhaltet Produkteigenschaften die zur Laufzeit in die office_config.xml geschrieben werden. Microsoft hat mit dem Wechsel zu Office 2016/365 den Syntax der XML Configdatei geändert und ich habe diese angepasst. **Wichtig MS hat mit 2016/365 Office den Update Mechanismus geändert, nach meinem Wissen funktioniert WSUS nicht mehr mit diesen Produkten** ==== English ==== The Setup.exe ist the [[https://www.microsoft.com/en-us/download/details.aspx?id=49117|Office Deployment Tool]] **Importent with my knowlege Updates via WSUS don`t work with Office 2016/365** FIXME Die Anleitung ist noch nicht fertig ===== Dateien / Files ===== ==== CLIENT_DATA ==== ├ office_config.xml ├ setup.exe ├ office365.png ├ setup.opsiscript ├ uninstall.opsiscript ├ 64 └ ... └ 32 └ ... ==== setup.opsiscript ==== [Actions] requiredWinstVersion >= "4.11.3.5" DefVar $LogDir$ DefVar $ProductId$ DefVar $ProductName$ DefVar $OfficeId$ DefVar $OfficeVersion$ DefVar $MinimumSpace$ DefVar $InstallPfad$ DefVar $SystemType$ DefVar $OfficeArchitecture$ DefVar $Office_Source$ DefVar $Language$ DefVar $InstallPath$ DefVar $AutoActivate$ DefVar $ExitCode$ DefVar $Config_Product$ DefVar $Config_Eula$ DefVar $Config_Log$ DefVar $Config_Updates$ DefVar $UpdateChannel$ DefVar $UpdateSource$ DefVar $ACCESSFiles$ DefVar $EXCELFiles$ DefVar $GrooveFiles2$ DefVar $OUTLOOKFiles$ DefVar $PPTFiles$ DefVar $PubPrimary$ DefVar $WORDFiles$ DefVar $XDOCSFiles$ DefVar $LYNCFiles$ DefVar $ONENOTEFiles$ DefVar $ONEDRIVE$ DefVar $VISIOVIEWERFiles$ DefStringList $Products$ ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- Set $LogDir$ = "%SystemDrive%\tmp" Set $ProductId$ = "office2016" Set $ProductName$ = "Office 365 Professional Plus" Set $OfficeId$ = GetProductProperty("officeid","O365ProPlusRetail") Set $MinimumSpace$ = "3 GB" Set $SystemType$ = GetSystemType Set $OfficeArchitecture$ = GetProductProperty("architecture","32") Set $InstallPath$ = GetProductProperty("Installationsdateien","%SystemDrive%\tmp") Set $UpdateSource$ = '\\' + GetProductProperty("Updatedateien","") + '\' + $OfficeArchitecture$ ;Variablen zum patchen der config.xml Set $Office_Source$ = '' Set $Config_Product$ = '' Set $Language$ = '' Set $Config_Eula$ = '' Set $Config_Log$ = '' Set $Config_Updates$ = '' Set $AutoActivate$ = '' Set $Products$ = GetProductPropertyList("products","True") Set $ACCESSFiles$ = takeFirstStringContaining($Products$, "Access") Set $EXCELFiles$ = takeFirstStringContaining($Products$, "Excel") Set $GrooveFiles2$ = takeFirstStringContaining($Products$, "Groove") Set $OUTLOOKFiles$ = takeFirstStringContaining($Products$, "Outlook") Set $PPTFiles$ = takeFirstStringContaining($Products$, "PowerPoint") Set $PubPrimary$ = takeFirstStringContaining($Products$, "Publisher") Set $WORDFiles$ = takeFirstStringContaining($Products$, "Word") Set $LYNCFiles$ = takeFirstStringContaining($Products$, "Skype") Set $ONENOTEFiles$ = takeFirstStringContaining($Products$, "OneNote") Set $ONEDRIVE$ = takeFirstStringContaining($Products$, "OneDrive") Set $VISIOVIEWERFiles$ = takeFirstStringContaining($Products$, "VisioViewer") ; ---------------------------------------------------------------- if CompareDotSeparatedNumbers(GetMsVersionInfo,"6.0") < "0" LogError "This is for NT 6 (Vista) and above" isFatalError else if not ($ACCESSFiles$ = "") Set $ACCESSFiles$ = '' else Set $ACCESSFiles$ = '' endif if not ($EXCELFiles$ = "") Set $EXCELFiles$ = '' else Set $EXCELFiles$ = '' endif if not ($GrooveFiles2$ = "") Set $GrooveFiles2$ = '' else Set $GrooveFiles2$ = '' endif if not ($OUTLOOKFiles$ = "") Set $OUTLOOKFiles$ = '' else Set $OUTLOOKFiles$ = '' endif if not ($PPTFiles$ = "") Set $PPTFiles$ = '' else Set $PPTFiles$ = '' endif if not ($PubPrimary$ = "") Set $PubPrimary$ = '' else Set $PubPrimary$ = '' endif if not ($WORDFiles$ = "") Set $WORDFiles$ = '' else Set $WORDFiles$ = '' endif if not ($LYNCFiles$ = "") Set $LYNCFiles$ = '' else Set $LYNCFiles$ = '' endif if not ($ONENOTEFiles$ = "") Set $ONENOTEFiles$ = '' else Set $ONENOTEFiles$ = '' endif if not ($VISIOVIEWERFiles$ = "") Set $VISIOVIEWERFiles$ = '' else Set $VISIOVIEWERFiles$ = '' endif if not ($ONEDRIVE$ = "") Set $ONEDRIVE$ = '' else Set $ONEDRIVE$ = '' endif if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on dirve %SystemDrive% is needed for " + $ProductId$ isFatalError "Not enough space" else comment "Display product logo" ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductName$ if ($OfficeArchitecture$ = "64") AND ($SystemType$ = "x86 System") Set $OfficeArchitecture$ = "32" comment "Wechsel Office Architekture zu Office x86" endif comment "Kopiere Installations Dateien" Message "Kopiere Installations Dateien für " + $OfficeArchitecture$ + "Bit ..." Files_copy_installfiles comment "Kopiere leere config.xml nach $LogDir$" Files_copy_patchtextfile comment "Patching config.xml" PatchTextFile_config_xml $LogDir$ + "\office_config.xml" Message "Installiere " + $ProductId$ + " ..." comment "Starte Setup Program" ChangeDirectory "%SCRIPTPATH%" Winbatch_install Sub_check_exitcode comment "Räume auf" Files_clean_installfiles endif endif [Files_copy_installfiles] copy -s "%ScriptPath%\$OfficeArchitecture$\*.*" "%SystemDrive%\tmp" [Files_copy_patchtextfile] copy "%ScriptPath%\office_config.xml" $LogDir$ [Files_clean_installfiles] delete -s "%SystemDrive%\tmp\Office" [PatchTextFile_config_xml] FindLine "" InsertLine ' $Config_Log$' InsertLine ' $AutoActivate$' InsertLine ' $Config_Eula$' InsertLine ' $Config_Updates$' InsertLine ' ' InsertLine ' ' InsertLine ' $ONEDRIVE$' InsertLine ' $LYNCFiles$' InsertLine ' $ONENOTEFiles$' InsertLine ' $VISIOVIEWERFiles$' InsertLine ' $WORDFiles$' InsertLine ' $PubPrimary$' InsertLine ' $PPTFiles$' InsertLine ' $OUTLOOKFiles$' InsertLine ' $GrooveFiles2$' InsertLine ' $EXCELFiles$' InsertLine ' $ACCESSFiles$' InsertLine ' $Language$' InsertLine ' $Config_Product$' InsertLine ' $Office_Source$' InsertLine '' [Winbatch_install] "%ScriptPath%\setup.exe" /configure "$LogDir$\office_config.xml" [Sub_check_exitcode] comment "Test for installation success via exit code" set $ExitCode$ = getLastExitCode ; informations to exit codes see ; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx ; http://msdn.microsoft.com/en-us/library/aa368542.aspx if ($ExitCode$ = "0") comment "Looks good: setup program gives exitcode zero" else comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ if ($ExitCode$ = "1605") comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." comment "Uninstall of a not installed product failed - no problem" else if ($ExitCode$ = "1641") comment "looks good: setup program gives exitcode 1641" comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." else if ($ExitCode$ = "3010") comment "looks good: setup program gives exitcode 3010" comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." else logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ isFatalError endif endif endif endif ==== office_config.xml ==== ==== uninstall.opsiscript ==== [Actions] requiredWinstVersion >= "4.11.3.5" DefVar $LogDir$ DefVar $ProductId$ DefVar $ProductName$ DefVar $OfficeId$ DefVar $MinimumSpace$ DefVar $InstallDir$ DefVar $InstallPfad$ DefVar $SystemType$ DefVar $Config_Product$ DefVar $Language$ DefVar $ExitCode$ ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- Set $LogDir$ = "%SystemDrive%\tmp" Set $ProductId$ = "office2016" Set $ProductName$ = "Office 2016 Professional Plus" Set $OfficeId$ = GetProductProperty("officeid","O365ProPlusRetail") Set $InstallDir$ = "Microsoft Office" Set $SystemType$ = GetSystemType ;Variablen zum patchen der office_remove.xml Set $Config_Product$ = '' Set $Language$ = '' ; ---------------------------------------------------------------- if CompareDotSeparatedNumbers(GetMsVersionInfo,"6.0") < "0" LogError "This is for NT 6 (Vista) and above" isFatalError else comment "Display product logo" ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductName$ comment "Kopiere leere config.xml nach $LogDir$" Files_copy_patchtextfile comment "Patching office_config.xml" PatchTextFile_remove_xml $LogDir$ + "\office_config.xml" Message "Installiere " + $ProductId$ + " ..." comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" Winbatch_remove endif [Files_copy_patchtextfile] copy "%ScriptPath%\office_config.xml" $LogDir$ [PatchTextFile_remove_xml] FindLine "" InsertLine ' ' InsertLine ' ' InsertLine ' $Language$' InsertLine ' $Config_Product$' InsertLine ' ' InsertLine '' [Winbatch_remove] "%ScriptPath%\setup.exe" /configure "$LogDir$\office_config.xml" ==== control ==== [Package] version: 1 depends: incremental: False [Product] type: localboot id: office2016 name: Office 2016 description: Office 2016 advice: version: 1.0 priority: 0 licenseRequired: False productClasses: setupScript: setup.opsiscript uninstallScript: uninstall.opsiscript updateScript: alwaysScript: onceScript: customScript: userLoginScript: [ProductProperty] type: unicode name: architecture multivalue: False editable: False description: Architektur der Office Installation x86 oder x64 values: ["32", "64"] default: ["32"] [ProductProperty] type: unicode name: officeid multivalue: False editable: True description: Produkt-ID für die Office 365 Installation values: ["O365ProPlusRetail", "O365BusinessRetail", "VisioProRetail", "ProjectProRetail", "SPDRetail", "AccessRuntimeRetail"] default: ["O365ProPlusRetail"] [ProductProperty] type: unicode name: Sprache multivalue: False editable: True description: Definiert die Sprache, die installiert werden soll values: ["de-de"] default: ["de-de", "MatchOS"] [ProductProperty] type: unicode name: Updatekanal multivalue: False editable: True description: Für die Office 2016-Version von Office 365 ProPlus bietet Microsoft drei Optionen, die als Updatekanäle bezeichnet werden und Ihnen helfen zu steuern, wie oft Office 365 ProPlus mit neuen Funktionen aktualisiert wird. values: ["Monthly", "Broad", "Targeted"] default: ["Broad"] [ProductProperty] type: unicode name: Updates multivalue: False editable: False description: Office sucht nach Updates. values: ["True", "False"] default: ["True"] [ProductProperty] type: unicode name: Installationsdateien multivalue: False editable: True description: Speicherort der Installationsdateien values: ["c:\tmp"] default: ["c:\tmp"] [ProductProperty] type: unicode name: Updatedateien multivalue: False editable: True description: Speicherort der Updatedateien values: ["%opsiDepotId%"] default: ["%opsiDepotId%"] [ProductProperty] type: unicode name: Auto_Aktivierung multivalue: False editable: False description: Wenn der Wert auf 1 gesetzt ist, werden Office 365 automatisch aktiviert. values: ["0", "1"] default: ["1"] [ProductProperty] type: unicode name: Installations_Status_MS multivalue: False editable: False description: Wenn Level auf None festgelegt ist, wird Office ohne Benutzeroberfläche installiert: Es werden keine Statusanzeigen, Fertigstellungsbildschirme, Fehlermeldungen oder sonstige Benutzeroberflächen angezeigt. values: ["None", "Full"] default: ["None"] [ProductProperty] type: unicode name: products multivalue: True editable: False description: welche Produkte installiert werden sollen values: ["Access", "Excel", "OneDrive", "OneNote", "Outlook", "PowerPoint", "Publisher", "Skype", "VisioViewer", "Word"] default: ["Access", "Excel", "OneNote", "PowerPoint", "Publisher", "VisioViewer", "Word"] [ProductDependency] action: setup requiredProduct: office2010pro requiredAction: uninstall requirementType: before ===== Updates ===== ===== Office Deployment Tool ===== Übersicht von dem MS Office Deployment Tool / Overview about MS ODT * [[https://docs.microsoft.com/de-de/deployoffice/overview-of-the-office-2016-deployment-tool|deutsch]] * [[https://docs.microsoft.com/en-en/deployoffice/overview-of-the-office-2016-deployment-tool|english]]