Created
November 29, 2016 22:15
-
-
Save jhochwald/ef6c6958dd2347e182620872b80c9907 to your computer and use it in GitHub Desktop.
This little helper suppresses the "What’s New" dialog for Office 2016 apps, and it also prevents the transfer of the telemetry data to Microsoft.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
### | |
# | |
# office2016_postinstall.sh | |
# | |
# This little helper suppresses the "What’s New" dialog for Office 2016 apps, | |
# and it also prevents the transfer of the telemetry data to Microsoft. | |
# Outlook 2016 and OneNote need an addition setting; | |
# The script takes care about that! | |
# | |
# What is missing? | |
# 1. OneNote - I still test that | |
# 2. Skype for Business - No idea if the it supports any of the settings yet! | |
# | |
# Someone told me, that I could use IF/THEN loops to detect if the app is | |
# installed or not. I decided to create the PLIST for every app, just in case! | |
# Even if an App is not installed, it should work as soon as the App is | |
# installed. | |
# On the other hand: I have a customer who installed office in a sub directory | |
# (/Applications/Office), that makes it harder to find the installed Office | |
# Applications. | |
# | |
# Check if the Files exist: | |
# josh@hive:~ $ ls -1 /Library/Preferences/com.microsoft.* | |
# /Library/Preferences/com.microsoft.Excel.plist | |
# /Library/Preferences/com.microsoft.Outlook.plist | |
# /Library/Preferences/com.microsoft.Powerpoint.plist | |
# /Library/Preferences/com.microsoft.Word.plist | |
# /Library/Preferences/com.microsoft.office.licensingV2.plist | |
# /Library/Preferences/com.microsoft.onenote.mac.plist | |
# | |
# Please note: | |
# As with every script that you might find in the Internet: Please check the | |
# script before execute it! If you have no idea what this script is doing, | |
# my advice is: Don't execute it! However, again, that applies to all scripts | |
# that you found and downloaded from the Internet. | |
# | |
# You need super user permission to set the defaults system wide! | |
# | |
# Example: | |
# sudo ./office2016_postinstall.sh) | |
# | |
# Warranty: | |
# There is no warranty in any kind! I tested the script carefully, but there | |
# is still a risk that something might go wrong. | |
# | |
# So, please don't blame me, you have been warned. | |
# | |
# Author: | |
# Joerg Hochwald <http://jhochwald.com> | |
# | |
# License: | |
# This script is Public Domain (PD), do whatever you like with it! :-) | |
# | |
### | |
# Load some defaults | |
. /etc/bashrc | |
PATH=/usr/local/bin:/usr/local/sbin/:/var/root/bin/:$PATH | |
export PATH | |
# Create an array with all the Office 2016 apps | |
OfficeApps=( Excel Outlook Powerpoint Word onenote.mac ) | |
for OfficeApp in "${OfficeApps[@]}" | |
do | |
# Suppresses the "What’s New" dialog for Office 2016 apps | |
if [[ $OfficeApp == "Outlook" ]] || [[ $OfficeApp == "onenote.mac" ]]; then | |
/usr/bin/defaults write /Library/Preferences/com.microsoft."$OfficeApp" kSubUIAppCompletedFirstRunSetup1507 -bool true | |
# Outlook and OneNote require one additional first run setting to be disabled | |
/usr/bin/defaults write /Library/Preferences/com.microsoft."$OfficeApp" FirstRunExperienceCompletedO15 -bool true | |
else | |
/usr/bin/defaults write /Library/Preferences/com.microsoft."$OfficeApp" kSubUIAppCompletedFirstRunSetup1507 -bool true | |
fi | |
# Prevent the sending of any telemetry towards Microsoft | |
/usr/bin/defaults write /Library/Preferences/com.microsoft."$OfficeApp" SendAllTelemetryEnabled -bool false | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment