Disabling First-run Dialogs in Office 2016 for Mac

tcandela
Valued Contributor II

I was directed to this web link: https://macops.ca/disabling-first-run-dialogs-in-office-2016-for-mac

but when i look under /Library/Preferences/ I do not have com.microsoft.Word (excel,ppoint)

but i have it under ~/Library/Containers/com.microsoft.Word/Data/Library/Preferences/com.microsoft.Word.plist

am i supposed to add each of the .plist (word,excel,ppoint) to /Library/Preferences/ ???

1 ACCEPTED SOLUTION

rtrouton
Release Candidate Programs Tester
25 REPLIES 25

rtrouton
Release Candidate Programs Tester

@tcandela,

Hopefully, the information from this post should make things more clear:

https://derflounder.wordpress.com/2016/01/17/suppressing-office-2016s-first-run-dialog-windows/

tcandela
Valued Contributor II

@rtrouton thanks for the link

are these files supposed to be present on the mac (i only install ppoint,excel,word,onenote) ? I don't see them. All i see is the licensingV2.plist

 /Library/Preferences/com.microsoft.Outlook.plist
    /Library/Preferences/com.microsoft.PowerPoint.plist
    /Library/Preferences/com.microsoft.Excel.plist
    /Library/Preferences/com.microsoft.Word.plist
    /Library/Preferences/com.microsoft.onenote.mac.plist

how can the DisableOffice2016FirstRun() function write to the files if they are not there ?

rtrouton
Release Candidate Programs Tester

@tcandela, the files won't be there by default in /Library/Preferences. If you run the defaults commands referenced in my post, they'll be created automatically with the correct settings.

tcandela
Valued Contributor II

@rtrouton so running the script will (from the link you provided) creates the files (based on which of the installed apps are present) with the correct settings to suppress those dialogs.

what i'm confused about is when you say 'If you run the defaults commands referenced in my post'

you mean just run the script ?
I do nothing manually to create the files, and what i meen by this is NOT going into terminal and running those 'defaults' commands ?

rtrouton
Release Candidate Programs Tester

@tcandela, sorry for the confusion. What I mean is this:

If you do not presently have a /Library/Preferences/com.microsoft.Word.plist file, you could run the following command in Terminal to suppress the first run dialog message for Word 2016:

sudo defaults write /Library/Preferences/com.microsoft.Word kSubUIAppCompletedFirstRunSetup1507 -bool true

Running the command above will do the following:

  1. Create a /Library/Preferences/com.microsoft.Word.plist file
  2. Inside the /Library/Preferences/com.microsoft.Word.plist file, the kSubUIAppCompletedFirstRunSetup1507 value will be created and set with a boolean value of true.

My script automates running these commands with root privileges.

tcandela
Valued Contributor II

this will suppress those MS Office 2016 first run dialogs for all future users that open Word,Excel,PPoint,OneNote?

why would this not exist currently in /Library/Preferences/com.microsoft.Word.plist (excel,ppoint,onenote) ?

I'd rather run the script. This will just be for lab computers. I'll test it anyways

thank you.

davidacland
Honored Contributor II

FWIW, we use a custom config profile to handle this. It works great and doesn't care where the plist is!

tcandela
Valued Contributor II

@davidacland explain what you're actually doing and how .

from what I can see are you doing the following; from the JSS are you creating a 'configuration profile' --> payload 'custom settings' --> uploading each .plist files (listed below)
with kSubUIAppCompletedFirstRunSetup1507 = true ?

com.microsoft.Word.plist
com.microsoft.Excel.plist
com.microsoft.PPoint.plist
com.microsoft.Onenote.plist

davidacland
Honored Contributor II

@tcandela

We're launching the applications to create the plist files, then running them through mcxtoprofile to create a .mobileconfig file.

Once we've got that we upload it into the JSS.

Aziz
Valued Contributor

@tcandela

I used mcxToProfile to create a .plist and I uploaded that to the JSS:

https://github.com/timsutton/mcxToProfile

optional image ALT text

optional image ALT text
)

@davidacland beat me to it.

tcandela
Valued Contributor II

i've launched Word,Excel/PPoint/OneNote but do not see .plist files in /Library/Preferences. I see them in the users location specified below.

I'm confused on why i don't see any of those .plist files in /Library/Preferences without me having to create them like rtrouton mentions ??

~/Library/Containers/com.microsoft.Word/Data/Library/Preferences/com.microsoft.Word.plist

Aziz
Valued Contributor

@tcandela

Check ~/Library/Preferences. It was in there for me, I just moved it to /Library/Preferences

Nix4Life
Valued Contributor

@Abdiaziz how's that working? are you deploying at user or computer level? asking because I have it as a user level setting so it get's deployed for each user after login. Your way seems to be a blanket..one and done if you will

Larry

Aziz
Valued Contributor

@LSinNY

Computer Level. Applies once for all users.

tcandela
Valued Contributor II

@Abdiaziz @davidacland I'll give this mcxtoprofile a look, it might be an adventure.

but it seems that @rtrouton method is alot simpler.

so i'll give both a try.

tcandela
Valued Contributor II

@Abdiaziz I'm giving this mcxtoprofile a shot, i'm using the same 4 commands that are viewable at the top of the image you posted. I'm grabbing 4 .plist file from my account (Word, Excel, Powerpoint, onenote.mac.plist) at

~/Library/Containers/com.microsoft./Data/Preferences/com.microsoft..plist

and putting them in /Library/Preferences.

did you create 4 sepertate Configuration Profiles? or just 1, and uploaded all 4 .plists ?

what is supposed to happen after i run the command ./mcxtoprofile.py ** ?

does it put a new file somewhere?

whats that # use this to find integer numbers for new versions ?

bpavlov
Honored Contributor

you will want to make sure those plist files only have the preferences you want to manage before you run it through a tool like MCXtoProfile or upload it directly to the JSS. Do not include settings you do not want to manage. I would recommend making a copy of the plist to another folder and then edit it using a text editor like TextWrangler which should be able to modify the plist without problem as is. Or get handy with the defaults command to remove/write the values you want.
Just make sure when you copy the plist file that the name stays intact.

Aziz
Valued Contributor

@tcandela

Grab the .plist from ~/Library/Preferences/ NOT from ~/Library/Containers/com.microsoft./Data/Preferences/com.microsoft.plist

When you run the MCX commands, deepening on where the mcxtoprofile is located, it will create a plist that can be uploaded to the JSS.

The defaults read command is needed when a new version of Office is released. It allows you to see the new version numbers, then you start the whole process all over again.

tcandela
Valued Contributor II

@Abdiaziz oh ok, maybe thats why i was getting errors when running mcxtoprofile commands when using the .plist from the other location.
Where does it put the created .plist?
Is it a .plist or mobileconfig ?
I tested usingn @rtrouton script in a configuration, i will see its result tomorrow.

Aziz
Valued Contributor

@tcandela

I usually put the mcxprofile folder on my desktop and run the command like the following:

Open Terminal:

cd desktop

cd mcxtoprofile

./mcxToProfile.py --plist /Library/Preferences/com.microsoft.Word.plist --identifier Suppress Microsoft Word Popup Windows 15.19.1.plist --manage Once

Then a .plist is created in the MCXtoProfile folder. That .plist can then be uploaded to the JSS to create a mobileconfig.

tcandela
Valued Contributor II

@rtrouton i'm using that script you provided, it works. I'll test the mcxtoprofile option sometime.

Kristopher
New Contributor III

Curious if this is still a valid workflow for suppressing the first run of Office windows? Also, how do you all handle installing this after the installation of office? Do you have a smart group? Any examples of the flow?

Thanks

mwineke
New Contributor

Is there a reason you have to specify the version? It seems like, until the preference setting changes or disappears, it should work regardless of the Office version.

jj_isd728
New Contributor II

I combined 2016 and 2019 settings. Gave credit from where I found the scripts or the information.
Also, this is a script, not hard-set configuration profiles.

#!/bin/bash
# Helps make managing plist files for Jamf Pro configuration profiles
# used to manage Microsoft Office 2019 settings. DM
# hEAVILY mODIFiED by Jeffro @isd728
# 09/12/2019
# https://www.jamf.com/jamf-nation/discussions/32264/office-2016-2019-blocking-intelligent-services
# https://www.jamf.com/jamf-nation/discussions/19096/disabling-first-run-dialogs-in-office-2016-for-mac
# https://derflounder.wordpress.com/2016/01/17/suppressing-office-2016s-first-run-dialog-windows/

# Setting the default location
TARGETDIR="" #THIS NEEDS to CHANGE

# Domains
OFFICE="com.microsoft.office"
OUTLOOK="com.microsoft.Outlook"
EXCEL="com.microsoft.Excel"
ONENOTE="com.microsoft.onenote.mac"
POWERPOINT="com.microsoft.Powerpoint"
WORD="com.microsoft.Word"
AUTOUPDATE="com.microsoft.autoupdate.fba"
AUTOUPDATE2="com.microsoft.autoupdate2"
ERRORREPORTING="com.microsoft.errorreporting"
OFFICE365SERCICEV2="com.microsoft.Office365ServiceV2"

OfficeFirstRunSettings(){
    echo "Setting correct PLIST defaults in "$TARGETDIR
    # Office
    /usr/bin/defaults write "$TARGETDIR"/"$OFFICE" DefaultsToLocalOpenSave -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$OFFICE" TermsAccepted1809 -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$OFFICE" OfficeAutoSignIn -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$OFFICE" ShowWhatsNewOnLaunch -bool FALSE

    # Outlook
    /usr/bin/defaults write "$TARGETDIR"/"$OUTLOOK" FirstRunExperienceCompletedO15 -bool TRUE

    # Excel
    /usr/bin/defaults write "$TARGETDIR"/"$EXCEL" kSubUIAppCompletedFirstRunSetup1507 -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$EXCEL" kFREEnterpriseTelemetryInfoKey -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$EXCEL" kFRETelemetryConsentKey -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$EXCEL" SendAllTelemetryEnabled -bool FALSE
    /usr/bin/defaults write "$TARGETDIR"/"$EXCEL" SendCrashReportsEvenWithTelemetryDisabled -bool FALSE

    # OneNote
    /usr/bin/defaults write "$TARGETDIR"/"$ONENOTE" kSubUIAppCompletedFirstRunSetup1507 -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$ONENOTE" kFREEnterpriseTelemetryInfoKey -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$ONENOTE" kFRETelemetryConsentKey -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$ONENOTE" SendAllTelemetryEnabled -bool FALSE
    /usr/bin/defaults write "$TARGETDIR"/"$ONENOTE" SendCrashReportsEvenWithTelemetryDisabled -bool FALSE

    # Outlook
    /usr/bin/defaults write "$TARGETDIR"/"$OUTLOOK" kSubUIAppCompletedFirstRunSetup1507 -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$OUTLOOK" kFREEnterpriseTelemetryInfoKey -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$OUTLOOK" kFRETelemetryConsentKey -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$OUTLOOK" SendAllTelemetryEnabled -bool FALSE
    /usr/bin/defaults write "$TARGETDIR"/"$OUTLOOK" SendCrashReportsEvenWithTelemetryDisabled -bool FALSE

    # Powerpoint
    /usr/bin/defaults write "$TARGETDIR"/"$POWERPOINT" kSubUIAppCompletedFirstRunSetup1507 -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$POWERPOINT" kFREEnterpriseTelemetryInfoKey -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$POWERPOINT" kFRETelemetryConsentKey -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$POWERPOINT" SendAllTelemetryEnabled -bool FALSE
    /usr/bin/defaults write "$TARGETDIR"/"$POWERPOINT" SendCrashReportsEvenWithTelemetryDisabled -bool FALSE

    # Word
    /usr/bin/defaults write "$TARGETDIR"/"$WORD" kSubUIAppCompletedFirstRunSetup1507 -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$WORD" kFREEnterpriseTelemetryInfoKey -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$WORD" kFRETelemetryConsentKey -bool TRUE
    /usr/bin/defaults write "$TARGETDIR"/"$WORD" SendAllTelemetryEnabled -bool FALSE
    /usr/bin/defaults write "$TARGETDIR"/"$WORD" SendCrashReportsEvenWithTelemetryDisabled -bool FALSE

    # AutoUpdate
    /usr/bin/defaults write "$TARGETDIR"/"$AUTOUPDATE" SendAllTelemetryEnabled -bool FALSE

    # AutoUpdate2
    /usr/bin/defaults write "$TARGETDIR"/"$AUTOUPDATE2" SendAllTelemetryEnabled -bool FALSE
    /usr/bin/defaults write "$TARGETDIR"/"$AUTOUPDATE2" AcknowledgedDataCollectionPolicy RequiredDataOnly
    /usr/bin/defaults write "$TARGETDIR"/"$AUTOUPDATE2" HowToCheck -string Manual

    # ErrorReporting
    /usr/bin/defaults write "$TARGETDIR"/"$ERRORREPORTING" SendCrashReportsEvenWithTelemetryDisabled -bool TRUE

    # OFFICE365SERCICEV2
    /usr/bin/defaults write "$TARGETDIR"/"$OFFICE365SERCICEV2" SendAllTelemetryEnabled -bool FALSE

}

# RUN IT FIRST FOR THE DEFAULT USER TEMPLATE
TARGETDIR="/System/Library/User Template/English.lproj/Library/Preferences" # New Users defaults
OfficeFirstRunSettings

TARGETDIR="/Library/Preferences" # Local Defaults
OfficeFirstRunSettings

# Identify all users on the Mac with a UID greater than 500

allLocalUsers=$(/usr/bin/dscl . -list /Users UniqueID | awk '$2>500 {print $1}')

for userName in ${allLocalUsers}; do

      # Identify the home folder location of all users with a UID greater than 500.

      userHome=$(/usr/bin/dscl . -read "/Users/$userName" NFSHomeDirectory 2>/dev/null | /usr/bin/sed 's/^[^/]*//g' |  /usr/bin/sed -e 's/^[ 	]*//')

      # Verify that home folder actually exists.

      if [[ -d  "$userHome" ]]; then
        # If the home folder exists, sets the plist file with the needed keys and values.
        TARGETDIR=""
        TARGETDIR="${userHome}/Library/Preferences" # User defaults

        OfficeFirstRunSettings

        echo " Repairing User Permissions for $userName "
        /usr/sbin/chown "$userName" "${userHome}/Library/"
        /usr/sbin/chown "$userName" "${userHome}/Library/Preferences"
        /usr/sbin/chown -Rf "$userName" "${userHome}/Library/Preferences/"

      fi

done

exit 0

tcandela
Valued Contributor II

@rtrouton I use your office 2016 suppress first run script for office 2019 also - looks to work for both. (link below). The only prompt that pops up is the Data Privacy - I don't mind that one, it's kinda useful information for the user to know.

I don't have anything but Word, Excel, Powerpoint install on users computers. Nobody uses the OneNote, and outlook, and I don't install autoupdate (I have updates install via policy, so each time Office has updates for Word, Excel, Powerpoint, I download them, test them and afterwards create a policy to install them when user logs out).

https://derflounder.wordpress.com/2016/01/17/suppressing-office-2016s-first-run-dialog-windows/