This shows you the differences between two versions of the page.
userspace:microsoft_office_2016 [2016/01/06 11:54] isnoguter |
userspace:microsoft_office_2016 [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Microsoft Office 2016 32-Bit und 64-Bit ====== | ||
- | //Author Dominik Daehn, based on Office 2013 Code by Jens Eppler, based on Office 2010 Code by Soren Birk | ||
- | // | ||
- | Dieses Paket installiert Microsoft Office 2010, 2013 und 2016 in der 32-Bit und 64-Bit Version. | ||
- | |||
- | Das Skript beinhaltet Produkteigenschaften die zur Laufzeit in die config.xml geschrieben werden. | ||
- | |||
- | Das Setup installiert nur die Produkte die in der Produkteigenschaft “products“ angegeben sind. | ||
- | |||
- | Das Skript funktioniert für verschiedenen Versionen von Office. Voraussetzung ist die Anpassung der Variablen $OfficeId$ in den Dateien setup.opsicript und uninstall.opsicript. Welche Version von Office Sie einsetzen, können Sie anhand des Installationsmediums feststellen. Dort befindet sich ein Ordner mit dem Namen ”[productid].ww”. Außerdem befindet sich in diesem Ordner die Datei config.xml, in der die korrekte Produkt ID in der ersten Zeile steht <Setup Id =”…”> | ||
- | |||
- | Ein Wechsel der installierten Office Architektur ist möglich indem das Paket nochmal auf setup gesetzt wird. | ||
- | |||
- | Falls auf einem Windows 32-Bit Client die Installation von Office 64-Bit ausgewählt wird, erfolgt automatisch die Installation von Office 32-Bit. | ||
- | |||
- | **Anleitung: | ||
- | * Entpacken Sie die Installationsdateien von Office und kopieren Sie diese in den Ordner CLIENT_DATA\x64 und CLIENT_DATA\x86. | ||
- | * Anpassung der Dateien setup.opsicript und uninstall.opsicript. Hier müssen die Variablen $ProductId$, | ||
- | * $OfficeId$ | ||
- | * " | ||
- | * " | ||
- | * … | ||
- | * $OfficeVersion$ | ||
- | * " | ||
- | * " | ||
- | * " | ||
- | * Anpassung der Datei OPSI\control | ||
- | |||
- | -------------- | ||
- | |||
- | This package installs Microsoft Office 2010, 2013 and 2016 in the 32-bit and 64-bit version. | ||
- | |||
- | In my script I am using some ProductProperties wich are written into a config.xml which is used for the silent installation then. | ||
- | |||
- | The setup will install only the products wich are selected by the multivalue property “products”. | ||
- | |||
- | You might be able to also use this script with different versions of Office if you replace the variable $OfficeId$ in the files setup.opsicript and uninstall.opsicript. You can discover your version of Office when you look at the folders on your installmedia. There should be a folder named ”[productid].ww”. To verify this check inside this folder the file named “setup.xml”. The correct product id is shown there in the first lines <Setup Id =”…”> | ||
- | |||
- | To change the installed Office architecture just set the package to setup again. | ||
- | |||
- | If the installation of Office 64-bit is selected on a Windows 32-bit client, the setup change to Office 32-bit automatically. | ||
- | |||
- | **Instructions: | ||
- | * Extract the Office install media to CLIENT_DATA\x64 and CLIENT_DATA\x86 | ||
- | * Adjustment of the files setup.opsicript und uninstall.opsicript. The variables $ProductId$, | ||
- | * $OfficeId$ | ||
- | * " | ||
- | * " | ||
- | * … | ||
- | * $OfficeVersion$ | ||
- | * " | ||
- | * " | ||
- | * " | ||
- | * Use the control file as shown below for OPSI\control | ||
- | |||
- | -------------- | ||
- | |||
- | **Tested with**: | ||
- | * OPSI 4.0.5.15 | ||
- | * Winst 4.11.4.17 | ||
- | * Windows 7, 64-Bit | ||
- | * Windows 7, 32-Bit | ||
- | |||
- | **Tree:** | ||
- | < | ||
- | CLIENT_DATA | ||
- | ├ config.xml | ||
- | ├ delsub32.opsiscript | ||
- | ├ delsub64.opsiscript | ||
- | ├ office2016.png | ||
- | ├ setup.opsiscript | ||
- | ├ uninstall.opsiscript | ||
- | ├ x64 | ||
- | └ ... | ||
- | └ x86 | ||
- | └ ... | ||
- | </ | ||
- | |||
- | ==== setup.opsiscript ==== | ||
- | <code winst> | ||
- | ; Author Dominik Daehn, based on Office 2013 Code by Jens Eppler, based on Office 2010 Code by Soren Birk | ||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $ProductName$ | ||
- | DefVar $OfficeId$ | ||
- | DefVar $OfficeVersion$ | ||
- | |||
- | DefVar $MinimumSpace$ | ||
- | DefVar $InstallDir$ | ||
- | DefVar $InstallPfad$ | ||
- | DefVar $SystemType$ | ||
- | DefVar $OfficeArchitecture$ | ||
- | DefVar $LicenseKey$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $UninstallProgram$ | ||
- | DefVar $UninstCmd$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $exitcodeActivation$ | ||
- | DefVar $Config_Product$ | ||
- | DefVar $Config_Eula$ | ||
- | DefVar $Config_Log$ | ||
- | DefVar $Config_Reboot$ | ||
- | DefVar $UserName$ | ||
- | DefVar $CompanyName$ | ||
- | DefVar $ACCESSFiles$ | ||
- | DefVar $EXCELFiles$ | ||
- | DefVar $GrooveFiles2$ | ||
- | DefVar $OUTLOOKFiles$ | ||
- | DefVar $PPTFiles$ | ||
- | DefVar $PubPrimary$ | ||
- | DefVar $QueryFiles$ | ||
- | DefVar $WORDFiles$ | ||
- | DefVar $XDOCSFiles$ | ||
- | DefVar $LYNCFiles$ | ||
- | DefVar $ONENOTEFiles$ | ||
- | DefVar $VISIOVIEWERFiles$ | ||
- | DefStringList $Products$ | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | Set $LogDir$ | ||
- | Set $ProductId$ | ||
- | Set $ProductName$ | ||
- | Set $OfficeId$ = " | ||
- | Set $OfficeVersion$ = " | ||
- | |||
- | Set $MinimumSpace$ | ||
- | Set $InstallDir$ = " | ||
- | Set $SystemType$ = GetSystemType | ||
- | Set $OfficeArchitecture$ = GetProductProperty(" | ||
- | Set $LicenseKey$ | ||
- | ;Variablen zum patchen der config.xml | ||
- | Set $Config_Product$ = '< | ||
- | Set $Config_Eula$ = '< | ||
- | Set $Config_Log$ = '< | ||
- | Set $Config_Reboot$ = '< | ||
- | Set $UserName$ | ||
- | Set $CompanyName$ | ||
- | Set $Products$ | ||
- | Set $ACCESSFiles$ | ||
- | Set $EXCELFiles$ | ||
- | Set $GrooveFiles2$ | ||
- | Set $OUTLOOKFiles$ | ||
- | Set $PPTFiles$ | ||
- | Set $PubPrimary$ | ||
- | Set $WORDFiles$ | ||
- | Set $LYNCFiles$ | ||
- | Set $ONENOTEFiles$ | ||
- | Set $VISIOVIEWERFiles$ | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | if GetMsVersionInfo < " | ||
- | LogError "This is for NT 6 (Vista) and above" | ||
- | isFatalError | ||
- | else | ||
- | ;Die oben ausgelesenen Variablen als PropertyListOption werden zu Strings, die in die config.xml ein- und dem Installer übergeben werden | ||
- | ;Access installieren oder nicht | ||
- | if not ($ACCESSFiles$ = "" | ||
- | Set $ACCESSFiles$ | ||
- | else | ||
- | Set $ACCESSFiles$ | ||
- | endif | ||
- | ;Excel installieren oder nicht (inkl. Datenbankanbindung) | ||
- | if not ($EXCELFiles$ = "" | ||
- | Set $QueryFiles$ | ||
- | Set $EXCELFiles$ | ||
- | else | ||
- | Set $QueryFiles$ | ||
- | Set $EXCELFiles$ | ||
- | endif | ||
- | ;OneDrive installieren oder nicht | ||
- | if not ($GrooveFiles2$ = "" | ||
- | Set $GrooveFiles2$ | ||
- | else | ||
- | Set $GrooveFiles2$ | ||
- | endif | ||
- | ;Outlook installieren oder nicht | ||
- | if not ($OUTLOOKFiles$ = "" | ||
- | Set $OUTLOOKFiles$ | ||
- | else | ||
- | Set $OUTLOOKFiles$ | ||
- | endif | ||
- | ; | ||
- | if not ($PPTFiles$ = "" | ||
- | Set $PPTFiles$ | ||
- | else | ||
- | Set $PPTFiles$ | ||
- | endif | ||
- | ;Publisher installieren oder nicht | ||
- | if not ($PubPrimary$ = "" | ||
- | Set $PubPrimary$ | ||
- | else | ||
- | Set $PubPrimary$ | ||
- | endif | ||
- | ;Word installieren oder nicht | ||
- | if not ($WORDFiles$ = "" | ||
- | Set $WORDFiles$ | ||
- | else | ||
- | Set $WORDFiles$ | ||
- | endif | ||
- | ;Skype installieren oder nicht | ||
- | if not ($LYNCFiles$ = "" | ||
- | Set $LYNCFiles$ | ||
- | else | ||
- | Set $LYNCFiles$ | ||
- | endif | ||
- | ;OneNote installieren oder nicht | ||
- | if not ($ONENOTEFiles$ = "" | ||
- | Set $ONENOTEFiles$ | ||
- | else | ||
- | Set $ONENOTEFiles$ | ||
- | endif | ||
- | ; | ||
- | if not ($VISIOVIEWERFiles$ = "" | ||
- | Set $VISIOVIEWERFiles$ | ||
- | else | ||
- | Set $VISIOVIEWERFiles$ | ||
- | endif | ||
- | |||
- | if not(HasMinimumSpace (" | ||
- | LogError "Not enough space on %SystemDrive%, | ||
- | isFatalError "Not enough space" | ||
- | else | ||
- | if ($OfficeArchitecture$ = " | ||
- | set $OfficeArchitecture$ = " | ||
- | comment " | ||
- | endif | ||
- | comment " | ||
- | ShowBitmap " | ||
- | |||
- | comment " | ||
- | Files_copy_patchtextfile | ||
- | |||
- | comment " | ||
- | PatchTextFile_config_xml $LogDir$ + " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section delsub32" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section delsub64" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | Message " | ||
- | |||
- | if ($OfficeArchitecture$ = " | ||
- | set $InstallPfad$ = " | ||
- | else | ||
- | set $InstallPfad$ = " | ||
- | endif | ||
- | |||
- | comment "Start setup program" | ||
- | ChangeDirectory " | ||
- | Winbatch_install | ||
- | Sub_check_exitcode | ||
- | |||
- | if not ($LicenseKey$ = "" | ||
- | comment "Set License Key" | ||
- | DosInAnIcon_set_key | ||
- | set $exitcodeActivation$ = getLastExitCode | ||
- | if not ($exitcodeActivation$ = " | ||
- | LogError " | ||
- | isFatalError " | ||
- | else | ||
- | comment " | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | |||
- | [Files_copy_patchtextfile] | ||
- | copy " | ||
- | |||
- | [PatchTextFile_config_xml] | ||
- | FindLine "</ | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | |||
- | [Winbatch_install] | ||
- | " | ||
- | |||
- | [DosInAnIcon_set_key] | ||
- | cscript //b " | ||
- | exit %ERRORLEVEL% | ||
- | |||
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ | ||
- | |||
- | ==== uninstall.opsiscript ==== | ||
- | <code winst> | ||
- | ; Author Dominik Daehn, based on Office 2013 Code by Jens Eppler, based on Office 2010 Code by Soren Birk | ||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $ProductName$ | ||
- | DefVar $OfficeId$ | ||
- | DefVar $OfficeVersion$ | ||
- | |||
- | DefVar $InstallDir$ | ||
- | DefVar $SystemType$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $UninstallProgram$ | ||
- | DefVar $UninstCmd$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $Config_Product$ | ||
- | DefVar $Config_Eula$ | ||
- | DefVar $Config_Log$ | ||
- | DefVar $Config_Reboot$ | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | Set $LogDir$ = " | ||
- | Set $ProductId$ | ||
- | Set $ProductName$ | ||
- | Set $OfficeId$ = " | ||
- | Set $OfficeVersion$ = " | ||
- | |||
- | Set $InstallDir$ = " | ||
- | Set $SystemType$ = GetSystemType | ||
- | Set $Config_Product$ = '< | ||
- | Set $Config_Eula$ = '< | ||
- | Set $Config_Log$ = '< | ||
- | Set $Config_Reboot$ = '< | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | comment " | ||
- | ShowBitmap " | ||
- | |||
- | Message " | ||
- | |||
- | comment " | ||
- | Files_copy_patchtextfile | ||
- | |||
- | comment " | ||
- | PatchTextFile_config_xml $LogDir$ + " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section delsub32" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section delsub64" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | [Files_copy_patchtextfile] | ||
- | copy " | ||
- | |||
- | [PatchTextFile_config_xml] | ||
- | FindLine "</ | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | InsertLine ' | ||
- | </ | ||
- | |||
- | ==== delsub32.opsiscript ==== | ||
- | <code winst> | ||
- | ; Author Dominik Daehn, based on Office 2013 Code by Jens Eppler, based on Office 2010 Code by Soren Birk | ||
- | |||
- | Set $UninstallProgram$ = " | ||
- | Set $UninstCmd$ = "/ | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists(" | ||
- | comment "The program seems to be installed, starting the uninstallation." | ||
- | Winbatch_uninstall | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | [Winbatch_uninstall] | ||
- | $UninstallProgram$ $UninstCmd$ | ||
- | |||
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ | ||
- | |||
- | ==== delsub64.opsiscript ==== | ||
- | <code winst> | ||
- | ; Author Dominik Daehn, based on Office 2013 Code by Jens Eppler, based on Office 2010 Code by Soren Birk | ||
- | |||
- | Set $UninstallProgram$ = " | ||
- | Set $UninstCmd$ = "/ | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists(" | ||
- | comment "The program seems to be installed, starting the uninstallation." | ||
- | Winbatch_uninstall | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | [Winbatch_uninstall] | ||
- | $UninstallProgram$ $UninstCmd$ | ||
- | |||
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ | ||
- | |||
- | ==== config.xml ==== | ||
- | <code xml> | ||
- | </ | ||
- | </ | ||
- | |||
- | ==== control ==== | ||
- | < | ||
- | [Package] | ||
- | version: 1 | ||
- | depends: | ||
- | incremental: | ||
- | |||
- | [Product] | ||
- | type: localboot | ||
- | id: office2016 | ||
- | name: Office 2016 | ||
- | description: | ||
- | advice: | ||
- | version: 1.0 | ||
- | priority: 0 | ||
- | licenseRequired: | ||
- | productClasses: | ||
- | setupScript: | ||
- | uninstallScript: | ||
- | updateScript: | ||
- | alwaysScript: | ||
- | onceScript: | ||
- | customScript: | ||
- | userLoginScript: | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: architecture | ||
- | multivalue: False | ||
- | editable: False | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: username | ||
- | multivalue: False | ||
- | editable: True | ||
- | description: | ||
- | values: ["" | ||
- | default: ["" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: companyname | ||
- | multivalue: False | ||
- | editable: True | ||
- | description: | ||
- | values: ["" | ||
- | default: ["" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: licensekey | ||
- | multivalue: False | ||
- | editable: True | ||
- | description: | ||
- | values: ["" | ||
- | default: ["" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: products | ||
- | multivalue: True | ||
- | editable: False | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [Changelog] | ||
- | office-2016 (1.0-1) testing; urgency=low | ||
- | |||
- | * Initial package | ||
- | |||
- | -- Dominik Daehn < | ||
- | </ |