Files
Alte_Skripte/de.ing.office.install.sh
2026-02-16 15:05:15 +01:00

51 lines
2.1 KiB
Bash

#!/bin/bash
##########################################################################
# Shellscript : Microsoft Office installieren
# Autor : Jobst Heinermann, macenterprise gmbh
##########################################################################
# Anmerkung:
# das komplette Paket kann hier (https://macadmins.software) geladen werden
# mit der Datei "de.ing.office.choices.xml" werden bestimmte
# Bestandteile bei der Installation ausgeschlossen
# Variabeln
OFFICE=/Library/Application\ Support/JAMF/Waiting\ Room/Microsoft_Office_16.30.19101301_Installer.pkg
LIC=/Library/Application\ Support/JAMF/Waiting\ Room/Microsoft_Office_2019_VL_Serializer.pkg
XML=/Library/Application\ Support/JAMF/de.ing.office_choices.xml
echo ""
echo "Installation Microsoft Office gestartet ..."
# Software installieren
/usr/sbin/installer -pkg "$OFFICE" -applyChoiceChangesXML "$XML" -allowUntrusted -target /
echo ""
echo "Installation beendet"
# Lizenz installieren
/usr/sbin/installer -pkg "$LIC" -target /
echo ""
echo "Lizenz installiert"
# "First Run" Nachrichten unterdrücken
# Microsoft Word
defaults delete com.microsoft.Word kSubUIAppCompletedFirstRunSetup1507
defaults write /Library/Preferences/com.microsoft.Word kSubUIAppCompletedFirstRunSetup1507 -bool true
# Microsoft Excel
defaults delete com.microsoft.Excel kSubUIAppCompletedFirstRunSetup1507
defaults write /Library/Preferences/com.microsoft.Excel kSubUIAppCompletedFirstRunSetup1507 -bool true
# Microsoft PowerPoint
defaults delete com.microsoft.PowerPoint kSubUIAppCompletedFirstRunSetup1507
defaults write /Library/Preferences/com.microsoft.PowerPoint kSubUIAppCompletedFirstRunSetup1507 -bool true
# "Default Save & Open" auf lokale Festplatte
/usr/bin/defaults write /Library/Preferences/com.microsoft.office DefaultsToLocalOpenSave -bool true
# Nach der Installation, sollen die benötigten Pakete wieder gelöscht werden.
rm -rf /Library/Application\ Support/JAMF/de.ing.office_choices.xml
rm -rf /Library/Application\ Support/JAMF/Waiting\ Room/Microsoft_Office_16.30.19101301_Installer.pkg
rm -rf /Library/Application\ Support/JAMF/Waiting\ Room/Microsoft_Office_2019_VL_Serializer.pkg