Posted on 01-27-2017 11:59 AM
I am just wondering how everyone is managing automating Office 2016 updates with Jamf? I know that MAU 4.0 is supposed to have system level settings available but as of right now it is still user level. I have a very large number of dispersed lab computers that do not normally have admins login so I am wondering what would be the best way to go about forcing automatic download and installation of updates. I am sorry if this question has been asked and answered in the past. Thank you in advance for the advice.
Solved! Go to Solution.
Posted on 01-27-2017 12:57 PM
@ABigRock at the bottom of Rich's article you will find a .mobileconfig link that you can upload into Casper and use as a Configuration Profile. Set it to Install Automatically and at Computer Level.
Posted on 01-27-2017 12:01 PM
subscribed. My environment also has many people without admin rights. I've been manually pushing out updates (5 packages for each office app).
Posted on 01-27-2017 12:10 PM
You're in luck as you can do that now with MAU 3.8.
https://macadmins.software/docs/MAU_38.pdf
Posted on 01-27-2017 12:29 PM
Brad_G, thank you for posting that but if I am not mistaken the "Automatically Download and Install" option is not defaulted for each user and is a user level setting. So while I may set it for the admin account any user that logs into the system would be defaulted to "Automatically check". It is great that it gets past the admin credentials requirement but would you happen to know how to force the settings change for all users? Additionally, I have found that, and I may be wrong, MAU is only checking for updates to Office 2016 applications that the current user has opened so if they have only opened word then that is all that will update. Again thank you for your quick response and I apologize if I am entirely incorrect in my assumptions.
Posted on 01-27-2017 12:36 PM
MAU 4.0 will have command line support. This should allow you to build a policy to check for updates and install them. Coming soon.
Posted on 01-27-2017 12:57 PM
@ABigRock at the bottom of Rich's article you will find a .mobileconfig link that you can upload into Casper and use as a Configuration Profile. Set it to Install Automatically and at Computer Level.
Posted on 01-27-2017 01:15 PM
@stevewood Thanks, that is exactly what I was looking for.
Posted on 01-29-2017 05:15 AM
@ABigRock I did a talk on MAU the other week - as well as getting MAU and a config profile out to your Macs, there are a couple of things you need to do when you consider that those running it may not have been the ones who installed in/Office. Full details in the video!
https://youtu.be/lxizq5EZHWM?t=39m58s
You need to make sure the apps are registered (can be added to the profile - either run all the Office apps on a machine and copy out the keys from ~/Library/Preferences/com.microsoft.autoupdate2.plist to your profile or check out the postinstall scripts in the Office installer pkg - you can use those to create the keys on a Mac you don't have Office on).
Also make sure MAU is registered with Launch Services for the current logged in user so it doesn't prompt them the first time it runs for them.
Login script to register MAU with Launch Services (I run this once per user per computer):
#!/bin/sh
loggedInUser=`python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");'`
su - "$loggedInUser" -c '/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -R -f -trusted -v "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app"'
su - "$loggedInUser" -c '/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -R -f -trusted -v "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/Microsoft AU Daemon.app"'
su - "$loggedInUser" -c 'defaults delete com.microsoft.autoupdate2 LastUpdate'
exit 0
Posted on 01-29-2017 04:15 PM
This script will create a LaunchAgent and registers MAU and All Office apps for the autoupdate, otherwise you will have to open each office app once to get it registered with MAU when you install Office via Casper.
You only need to run this script once per computer.
#!/bin/sh
# All Glory and Thanks to Jesus!
#
# Create MAU trust Launch Agent and the Script using scripting method
#
/bin/cat << 'EOF' > "/Library/LaunchAgents/com.myorg.registermau.plist"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.myorg.registermau</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/RegisterMAU.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOF
/bin/cat << 'EOF' > "/usr/local/bin/RegisterMAU.sh"
#!/bin/sh
###############################################################################################################
#
# Register MAU using a Launch Agent (/Library/LaunchAgents/com.myorg.registermau.plist)
#
###############################################################################################################
###########
# Functions
###########
# Check if com.myorg.MAUtrustDone.plist file exists and if yes don't re-register
checkMAUtrustDone() {
if [ -f $HOME/Library/Preferences/com.myorg.MAUtrustDone.plist ] ; then
exit 0
fi
}
# re-register and create a file called com.myorg.MAUtrustDone.plist
trustMAU() {
if [ -e "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app" ]; then
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -R -f -trusted "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app"
fi
if [ -e "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/Microsoft AU Daemon.app" ]; then
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -R -f -trusted "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/Microsoft AU Daemon.app"
fi
# Add office apps to com.microsoft.autoupdate2 plist
# Taken from Office Postinstall script and edited
applications="
Word.app
Excel.app
PowerPoint.app
OneNote.app
Outlook.app"
for application in $applications
do
domain="com.microsoft.autoupdate2"
defaults_cmd="/usr/bin/defaults"
application_info_plist="/Applications/Microsoft $application/Contents/Info.plist"
lcid="1033"
if /bin/test -f "$application_info_plist"
then
application_bundle_signature=$($defaults_cmd read "$application_info_plist" CFBundleSignature)
application_bundle_version=$($defaults_cmd read "$application_info_plist" CFBundleVersion)
application_id=$(printf "%s%02s" "$application_bundle_signature" "${application_bundle_version%%.*}")
$defaults_cmd write $domain Applications -dict-add "/Applications/Microsoft $application" "{ 'Application ID' = $application_id; LCID = $lcid ; }"
fi
done
/usr/bin/touch $HOME/Library/Preferences/com.myorg.MAUtrustDone.plist
}
# Execute the Functions
checkMAUtrustDone
trustMAU
exit 0
EOF
# Set the correct permissions on the created files
/usr/sbin/chown -R root:wheel "/Library/LaunchAgents/com.myorg.registermau.plist"
/bin/chmod -R 644 "/Library/LaunchAgents/com.myorg.registermau.plist"
/usr/sbin/chown -R root:wheel "/usr/local/bin/RegisterMAU.sh"
/bin/chmod a+x "/usr/local/bin/RegisterMAU.sh"
# Run Once for current user as LaunchAgent will kick-in for next user onwards and we are running the initial run as root.
CurrentloggedInUser=$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");')
if [ -e "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app" ]; then
sudo -u "$CurrentloggedInUser" /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -R -f -trusted "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app"
fi
if [ -e "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/Microsoft AU Daemon.app" ]; then
sudo -u "$CurrentloggedInUser" /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -R -f -trusted "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/Microsoft AU Daemon.app"
fi
# Add office apps to com.microsoft.autoupdate2 plist
# Taken from Office Postinstall script and edited
applications="
Word.app
Excel.app
PowerPoint.app
OneNote.app
Outlook.app"
for application in $applications
do
domain="com.microsoft.autoupdate2"
defaults_cmd="/usr/bin/sudo -u $CurrentloggedInUser /usr/bin/defaults"
application_info_plist="/Applications/Microsoft $application/Contents/Info.plist"
lcid="1033"
if /bin/test -f "$application_info_plist"
then
application_bundle_signature=$($defaults_cmd read "$application_info_plist" CFBundleSignature)
application_bundle_version=$($defaults_cmd read "$application_info_plist" CFBundleVersion)
application_id=$(printf "%s%02s" "$application_bundle_signature" "${application_bundle_version%%.*}")
$defaults_cmd write $domain Applications -dict-add "/Applications/Microsoft $application" "{ 'Application ID' = $application_id; LCID = $lcid ; }"
fi
done
exit 0
Posted on 01-29-2017 08:52 PM
@stevewood Hi, i would like to ask about Rich's article where i need to copy this code?and where in casper i need to put it? do i need to upload it under custom setting under configuration profile?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.microsoft.autoupdate2</key>
<dict>
<key>Forced</key>
<array>
<dict>
<key>mcx_preference_settings</key>
<dict>
<key>HowToCheck</key>
<string>AutomaticDownload</string>
</dict>
</dict>
</array>
</dict>
</dict>
<key>PayloadEnabled</key>
<true/>
<key>PayloadIdentifier</key>
<string>MCXToProfile.67ad2621-b510-4060-b971-7f7cf51506c9.alacarte.customsettings.c00e472d-4cb4-4231-8fd4-c7fa866efc00</string>
<key>PayloadType</key>
<string>com.apple.ManagedClient.preferences</string>
<key>PayloadUUID</key>
<string>c00e472d-4cb4-4231-8fd4-c7fa866efc00</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</array>
<key>PayloadDescription</key>
<string>Enable Automatic Download and Installation of Microsoft Office 2016 Updates</string>
<key>PayloadDisplayName</key>
<string>Enable Automatic Download and Installation of Microsoft Office 2016 Updates</string>
<key>PayloadIdentifier</key>
<string>com.company.profile.EnableAutomaticDownloadAndInstall</string>
<key>PayloadOrganization</key>
<string></string>
<key>PayloadRemovalDisallowed</key>
<false/>
<key>PayloadScope</key>
<string>System</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>67ad2621-b510-4060-b971-7f7cf51506c9</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>
Posted on 01-30-2017 05:34 AM
Carrying on from Brad's response above, we followed this from derFlounder Blog:
https://derflounder.wordpress.com/2016/10/12/enabling-automatic-download-and-installation-of-microsoft-office-2016-updates/
was very good at improving this, but still reqquires the user to press to search for updates, so we cant automate this well just yet, but has certainly improved the rate in which users update office.
Posted on 01-30-2017 06:27 AM
@jamfmdm yes, under Configuration Profiles you click the Upload icon and upload the .mobileconfig file to your JSS.
Posted on 01-30-2017 07:26 PM
@stevewood i tried that but i have an error message telling me that "
The file could not be parsed"
is there any other script for autoupdate?
Posted on 01-30-2017 07:40 PM
@jamfmdm how are you creating that .mobileconfig file? The error that you have there leads me to believe the formatting of the file is wrong. How did you download/create the file?
Here's what I just did to test:
I did not receive the parsing error that you received. Can you confirm that those are the steps you are taking? I would make sure you are not using TextEdit to copy and paste. That often times causes parsing errors like this. If you have to, download Text Wrangler and use it for saving the file.
Posted on 01-30-2017 07:54 PM
@stevewood it's working now.
thanks
Posted on 02-03-2017 10:38 AM
@Kumarasinghe Hey, that's a great script, and I think it comes in handy if you haven't run MAU in a computer.
But, since I've run MAU on a machine already, can I just use my existing com.microsoft.autoupdate2.plist, add the key for AutomaticDownload, point it to our in-house MAU Caching Server, convert it to a Configuration Profile, and call it a day?
I guess I could still use the launchservice script by @neil.martin83 just to trigger the thing, right?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Applications</key>
<dict>
<key>/Applications/Microsoft Excel.app</key>
<dict>
<key>Application ID</key>
<string>XCEL15</string>
<key>LCID</key>
<integer>1033</integer>
</dict>
<key>/Applications/Microsoft OneNote.app</key>
<dict>
<key>Application ID</key>
<string>ONMC15</string>
<key>LCID</key>
<integer>1033</integer>
</dict>
<key>/Applications/Microsoft Outlook.app</key>
<dict>
<key>Application ID</key>
<string>OPIM15</string>
<key>LCID</key>
<integer>1033</integer>
</dict>
<key>/Applications/Microsoft PowerPoint.app</key>
<dict>
<key>Application ID</key>
<string>PPT315</string>
<key>LCID</key>
<integer>1033</integer>
</dict>
<key>/Applications/Microsoft Word.app</key>
<dict>
<key>Application ID</key>
<string>MSWD15</string>
<key>LCID</key>
<integer>1033</integer>
</dict>
<key>/Applications/Skype for Business.app</key>
<dict>
<key>Application ID</key>
<string>MSFB16</string>
<key>LCID</key>
<integer>1033</integer>
</dict>
<key>/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app</key>
<dict>
<key>Application ID</key>
<string>MSau03</string>
<key>LCID</key>
<integer>1033</integer>
</dict>
</dict>
<key>HowToCheck</key>
<string>AutomaticDownload</string>
<key>LastUpdate</key>
<date>2017-02-02T12:15:53Z</date>
<key>SendAllTelemetryEnabled</key>
<true/>
<key>StartDaemonOnAppLaunch</key>
<true/>
</dict>
</plist>
Posted on 02-05-2017 03:07 PM
@itupshot the script will trust MAU and also registers each Office applications on MAU to get auto updates working otherwise MAU only update the apps which were previously registered (by opening the app).
e.g. If you have never opened Outlook after install Office 2016, MAU will not auto update Outlook.
(This only applies if you install Office 2016 via command line or via Casper. Manual install has a postinstall script built-in with Office pkg which does the same thing.)
Posted on 02-06-2017 08:46 AM
@neil.martin83 Your script didn't work for me as is. I get an error logged from Casper Remote when I tested it. Using only the two middle lines also resulted in an error. So I launched MAU manually to test Config Profile.
Good news is that the Config Profile I derived from my com.microsoft.autoupdate2.plist file seems to be working. My test machines are downloading the updates very fast from my local MAU Caching Server. However, it doesn't seem to be logging anything to the /Library/Logs/Microsoft/autoupdate.log file. In fact, it just stays blank, and says it's zero bytes in size.
One thing I noticed is that the MAU still allows the checkbox for "Join the Office Insider program..." to be selected. Shouldn't it gray it out?
Posted on 02-06-2017 08:50 AM
@itupshot I think if you run scripts with Casper Remote, the logged in user is detected as root. The script needs to be run by a policy triggered at login - it detects the name of the user logging in and runs those commands to register MAU with Launch Services as that user. :-)
Posted on 02-06-2017 08:56 AM
@neil.martin83 OK, I'll try it on my second test machine as a policy run at Login. You said the frequency should be "once per user per computer," correct?
Posted on 02-06-2017 08:59 AM
@itupshot Yep that's how I do it.
Posted on 02-06-2017 09:14 AM
You need to add the following key to your mobileconfig to disable the "Join the Office Insider program..." check box
<key>DisableInsiderCheckbox</key>
<true/>
or run the following defaults command as part of your login policy/script ( once per user)
/usr/bin/defaults write /Library/Preferences/com.microsoft.autoupdate2 DisableInsiderCheckbox -bool TRUE
I have used both with no issues
Posted on 02-06-2017 09:15 AM
Posted on 02-06-2017 09:47 AM
@LSinNY Thanks for the tip! I'll add that to my "master" com.microsoft.autoupdate2.plist file, and convert it again to a Config Profile for the next round of tests.
Posted on 02-06-2017 12:23 PM
@neil.martin83 I'm getting this output when the script runs with a lot of these "error -10811" lines.
Is that normal?
It looks like it worked, though. When I launch one (or two) of the Office apps, the ones not running are being updated, and I get the notification that there are updates for the ones running.
Any ideas how we can deploy this for users who don't have MAU installed? Currently, we install Office with a choices.xml file that excludes MAU. If I deploy MAU now separately to all those users, they'll get the app asking if it's OK to run. My users pretty much never log out, so it's not easy to sneak this one in for the app to register with Launch Services in the background.
Posted on 02-06-2017 02:27 PM
@itupshot Take the "-v" out of your lsregister line(s). This verbose flag is causing you to see these errors.
Posted on 02-06-2017 02:41 PM
@itupshot yep those errors are normal - lsregister literally tries to register every file in the app bundles but only succeeds on the root of the bundles themselves. It's harmless and doesn't mean failure. Keeping the -v flag means you will see that the command has run properly - e.g. if the target app bundle isn't present or has been moved, you'll know. Running it without -v won't give any feedback either way which might hamper troubleshooting later on.
Posted on 02-06-2017 02:46 PM
@itupshot you can also include that script in the policy that installs MAU, to run after the pkg is installed - if a user is logged in, those commands will run in their context and MAU will get registered and won't prompt. If no user is logged in then the commands will fail because su won't have a user to switch to (the policy won't fail though because the script always exits with code 0). Again, harmless. I did this myself when deploying MAU just in case.
Posted on 02-09-2017 01:56 PM
I'm trying to set this up, but struggling with setting up a MAU cache server. Per the documentation here, I should be able to run this: MAUCacheAdmin --CachePath:/Volumes/web/MAU/cache --CheckInterval:60, but it appears to be ignoring the parameters - I'm just getting the ShowUsage function, which is the default if no params are passed. I suspect it's something I don't know about running BASH scripts in El Cap, but I'm not finding any tricks involved with that. Any help appreciated!
Posted on 02-09-2017 03:00 PM
Is your server cache path /Volumes/web/MAU/cache ? if not that is the problem. What you posted from the help file is an example. My cache path is /Volumes/MAU/MO2016, so the full command would be MAUCacheAdmin --CachePath:/Volumes/MAU/MO2016 --CheckInterval:60, which works and has the last line that reads:
Sleeping for 60 minutes
Posted on 02-09-2017 03:06 PM
No, forgot to mention that - modified the cache path to match my environment. But it's like it isn't even trying to read the parameters, that's what I'm not getting. I've tried prefixing with "sh " and "sudo sh ", but nothing is working. Actually, I should say that prefixing with "sh " is the only way I can get it to do anything, but then it only returns the ShowUsage verbiage. The actual command I'm running is:
sh MAUCacheAdmin --CachePath:/Volumes/Server SSD/Library/Server/Web/Data/Sites/Default/MSOffice2016Updates/ --Checkinterval:60
Posted on 02-09-2017 03:10 PM
Any chance the space in the volume name would be causing a problem?
Posted on 02-09-2017 03:38 PM
This will get you going.
sudo sh MAUCacheAdmin --CachePath:'/Volumes/Server SSD/Library/Server/Web/Data/Sites/Default/MSOffice2016Updates' --CheckInterval:60
Posted on 02-09-2017 04:57 PM
I have a mixed environment of Office 2011 and 2016. I'm noticing not all machines have MAU 3.8. Can I push a MAU 3.8 installer to all machines, enable Automatic Download (defaults write com.microsoft.autoupdate2 HowToCheck AutomaticDownload) and expect this to work?
What is the interval in which a machine will check for updates with automatic download?
Posted on 02-09-2017 10:11 PM
@dmillertds have you tried using the absolute path? I have the MAUCacheAdmin binary in /usr/local/. so the full command is
sudo /usr/local/MAUCacheAdmin --CachePath:/Volumes/MAU/MO2016 --CheckInterval:60
@bbot Yes, however you will may need to update com.microsoft.autoupdate2 via defaults write, modify the profile above or run @Kumarasinghe's script to reflect the addition of the Office 2011 apps
Posted on 02-10-2017 08:42 AM
@Kumarasinghe and @LSinNY - thank you both! I combined your suggestions and it finally worked. I had already CD'ed to /usr/local, so I don't know why I had to put in the path, but it did work. And I should have tried the single-quotes around the cache location. I had tried double, but that didn't work.
Posted on 02-10-2017 08:55 AM
Glad you got it working. just so you know, if you do cd into /usr/local/, you can run the command by adding "./"
to run the MAUCacheAdmin binary directly
sudo (if applicable) ./MAUCacheAdmin --CachePath:/Volumes/MAU/MO2016 --CheckInterval:60
Posted on 02-15-2017 01:20 PM
How can I force the enable insider build using a configuration profile?
I'm creating 2 mobileconfigs, one to disable for most of the company, and another to enable Officer Insider for our internal technology department for testing purposes.
Posted on 04-11-2017 04:57 PM
I've updated the MAU clients to v. 3.9, and now we can't download updates from the MAU Caching Server. We keep getting this error:
EDIT: Never mind. I didn't give the server enough time to download the updates. They're all in now, and we can download.
Posted on 04-24-2017 02:51 PM
@neil.martin83 How often does the MAU 3.9 app check for updates by default? I ran the script that registers the Office apps with MAU and installed a profile to auto download and install and lock out the MAU prefs. I had to put the clock forward on the Mac a couple of weeks to get all of the Office 2016 apps to auto update silently. We are not using a MAU caching server. For instance Word, Outlook and Powerpoint updated right away but then Excel and OneNote did not until I set the clock forward a few weeks.