Skip to main content

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.

@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.


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!


@dmillertds

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


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


Any chance the space in the volume name would be causing a problem?


This will get you going.

sudo sh MAUCacheAdmin --CachePath:'/Volumes/Server SSD/Library/Server/Web/Data/Sites/Default/MSOffice2016Updates' --CheckInterval:60

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?


@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


@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.


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

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.


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.


@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.


@rtrav I know the documentation states every 12 hours

MAU detects application updates every 12 hours...

but I left a test machine on and intentionally did not run updates but it did not install anything over night and it's been more than 12 hours.

Does anyone know a way to manipulate the time it takes to check in?


neil.martin83 can you share - the profile that you used to auto download and install and lock out the MAU prefs?


I've created a Configuration profile to push out that enables auto downloads in MAU and also registers each application as @neil.martin83 pointed out but it's not automatically updating the closed applications, only the open ones.

Should the configuration profile be user level ? at the moment i have it set to computer level.
(i did test at user level but it still didn't update the applications)

if i look at /Library/Managed Preferences/com.microsoft.autoupdate2.plist i can see the key entries,
when i look in ~/Library/Preferences/com.microsoft.autoupdate2.plist i do not (it's set to Auto Check and has no applications registered)

any pointers ?
here's the custom plist i'm sending in the 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>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 Lync.app</key>
        <dict>
            <key>Application ID</key>
            <string>UCCP14</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>
        <key>/Library/Internet Plug-Ins/Silverlight.plugin</key>
        <dict>
            <key>Application ID</key>
            <string>SLVT</string>
            <key>LCID</key>
            <integer>1033</integer>
        </dict>
    </dict>
    <key>HowToCheck</key>
    <string>AutomaticDownload</string>
    <key>LastUpdate</key>
    <string>2001-01-01T00:00:00Z</string>
</dict>
</plist>

Also, can someone point me to which folder the downloaded updates are stored in before they're installed ? maybe i can monitor that to see if it's working or not.

thanks!


i've tested the configuration at user and computer level and looking at the /Library/Logs/Microsoft/autoupdate.log nothing updates when set to Download and Instal Automatically, i created a LaunchAgent and script to register the MAU app and Daemon once per user, is there anyway to confirm that it is registering them correctly ?

#!/bin/sh
LoggedInUser=$( stat -f%Su /dev/console )

if [[ $LoggedInUser = "root" ]]; then
exit 0

fi

#create directory if it doesn't exist
if [ ! -d /Users/$LoggedInUser/Documents/.MAU_check ] ; then
mkdir /Users/$LoggedInUser/Documents/.MAU_check


fi

done=$( cat /Users/$LoggedInUser/Documents/.MAU_check/MAU_register.txt )

if [[ "$done" == *"$LoggedInUser"* ]]; then 

exit 0

fi



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"
        echo "Autoupdate.app registered for $LoggedInUser" > /Users/$LoggedInUser/Documents/.MAU_check/MAU_register.txt

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"
        echo "AU Daemon.app registered for $LoggedInUser" > /Users/$LoggedInUser/Documents/.MAU_check/MAU_register.txt

Apologies for the late reply, life took over a bit...

@rtrav It checks at least every 12 hours and is invoked when you launch one of the apps. I need to double check the docs but I believe it'll run again after 12 hours if there's a registered app running (e.g. user leaves Word open for that long). It will only check for updates against apps that are registered with it (those <Applications> keys in its preference domain). If you're not managing those keys in a profile or by defaults writing them, registering the apps happens when each app is launched on a per app basis at the user level. If you have a user who never launches OneNote, for example, it won't ever update, unless you manage its <Application> keys.

@cbruce My profile is here, for reference: https://gist.github.com/neilmartin83/cb7ebe5f9afb3aa40e6d97d5bc917ded

Note that I am also managing preferences for our own caching server which holds both the collateral and packages. I also disable the Insider checkbox. I install this profile at system level and the closed apps also update just fine across my fleet.

As a side note, I have another profile which is the same as above, but points to a different set of URLs (subdirectories on my caching server) where I host the current set of updates - this lets me roll those out to a pilot group of machines for testing.

@May Here's the script I use to register MAU with LaunchServices so you don't get the nag dialog. I run it at every login via the JSS - it's not resource intensive and this method means it catches everyone. I noticed that after a MAU update, it needed re-registering, so that's why I did this, otherwise I'd have done it once per user. This method also means the JSS collects the output and logs it. You can get verbose output by adding the -v flag to the lsregister commands: https://gist.github.com/neilmartin83/4e704a0c627453ca216d413c2ae43182

This script runs as root (as it's being run by the jamf binary) so essentially works out who the logged in user is, then runs the commands to register MAU as them, plus deleting the <LastUpdate> preference key so that when they launch one of the Office apps, it'll check for updates right away. I'm lazy and didn't bother with the awesome amount of sanity checking you've put in yours because Office is deployed to our entire fleet. :)

Check /Library/Logs/Microsoft/autoupdate.log to see if it's doing what it should, it's pretty good at telling you that it's checking, downloading, then installing the packages. You can also enable even more verbose logging by managing the <ExtendedLogging> key (true/false).

All the reference material is here: https://macadmins.software/docs/MAU_38.pdf


Thanks @neil.martin83, you've been very helpful in laying out the hidden pieces of this puzzle!

Good to know that MAU needs re-registering each update, i'll test out your login policy/script approach so i can set it and forget it rather than messing with LaunchAgents each update.


@neil.martin83

Are there any particular tricks to getting login policies to run ?

I just created a policy with the Trigger = login, Frequency = ongoing, Make available offline is checked.

Double checked that Management Settings > Check - In > Login/Logout Hooks has Create login/logout hooks checked.

I've logged the user out and in a few times and also ran recon incase that's needed to pull down the script initially but if i check the policy logs it's still shown as pending.

Should i see something from the Policy within /Library/Application Support/JAMF/ManagementFrameworkScripts/loginhook.sh ?
(i can see that com.apple.loginwindow has this set as the LoginHook),
and will login hooks only run if the Mac is on the network ? (i was assuming that the Make available offline option would mean network wasn't required)

JSS 9.96
OS X 10.11.6


I'm glad to say i couldn't get a login policy to run as it sent me down a different route, ideally i didn't want to wait for a user to login for MAU to get registered, i was looking at using /bin/launchctl asuser but couldn't get it to work then stumbled across this post which has a wonderfully simple approach to running commands under the user context, thank you @mm2270 !!

Now i can run this to register MAU once per user and each time there's an MAU update, hoorah.

```

!/bin/bash

LoggedInUser=$(stat -f%Su /dev/console)
LoggedInUID=$(id -u "$LoggedInUser")

if [[ "$LoggedInUser" != "root" ]] || [[ "$LoggedInUID" -ne 0 ]]; then

cat << EOF > /private/tmp/MAU_register_script.sh

!/bin/bash

LoggedInUser=$(stat -f%Su /dev/console)

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -R -f -trusted -v "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app"
/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"

mkdir /Users/$LoggedInUser/Documents/.MAU_check/
echo "Autoupdate.app registered for $LoggedInUser" > /Users/$LoggedInUser/Documents/.MAU_check/MAU_register.txt
EOF

else echo "No user logged in. Can't run as user, so exiting" exit 0
fi

if [ -e /private/tmp/MAU_register_script.sh ]; then /bin/chmod +x /private/tmp/MAU_register_script.sh /bin/launchctl asuser "$LoggedInUID" sudo -iu "$LoggedInUser" "/private/tmp/MAU_register_script.sh" sleep 2 echo "Cleaning up..." /bin/rm -f "/private/tmp/MAU_register_script.sh"
else echo "Oops! Couldn't find the script to run. Something went wrong!" exit 1
fi```


All we'd like to do is just shoot a simple bash script using a policy in the JSS to our logged in users with the following:

defaults write com.microsoft.autoupdate2 HowToCheck AutomaticDownload

but for some reason, it's not working. If i copy and paste this into Terminal directly under the logged in user, it works.

Any ideas why?


@monaronyc You have to write to the logged in user's prefs:

# Set Microsoft updater to automatically install updates from a local cache - requires changing the user's prefs rather than the global prefs in /Library/Preferences
loggedInUser=$(stat -f%Su /dev/console)

/usr/bin/defaults write /Users/$loggedInUser/Library/Preferences/com.microsoft.autoupdate2 HowToCheck AutomaticDownload

@StoneMagnet SWEET MARY JESUS! That worked! THANK YOU! THANK YOU! As you can see i'm still a bit of a novice with this stuff, but getting better thanks to folks like you and the JAMF community! One thing though, we're still not seeing that global prefs file in /Library/Preferences yet. Are we supposed to place that manually some way?


@monaronyc As near as I can tell any com.microsoft.autoupdate2 prefs file in /Library/Preferences is ignored, and only the one in ~/Library/Preferences matters