This post describes the work I did as an Intern at Microsoft during Summer and Fall 2016.

Anyone who uses Microsoft Office on their Mac most likely knows what Microsoft AutoUpdate is. It's the annoying little piece of software that pops up when you open a Microsoft app on your Mac that has updates available.

What did the previous update process look like for the average user?

side-large

Whenever you open any Microsoft application on your Mac, there is a program that is also launched called the Microsoft AutoUpdate Daemon that sits in the background and periodically checks for updates while the application you are using is running. If updates are found, it will tell Microsoft AutoUpdate about it and you will see a window appear like this one.

If you're like me, you don't use Office every day, but when you do open it, it's because you have an important thing to do. It's annoying to have this thing pop up in your face while you are just getting started on your work.

Well, the easiest thing to do here would just be to click Cancel and continue on with what I'm doing. Nobody wants to take the time to stop their work and install updates! Of course, that means many people miss out on new features and bug fixes in the software. If you look at the usage data of Office on the Mac, we can see quite a large amount of users on an older version. Not good.

For those who decide to install the updates and click the Install button, here's what happens. Your updates start downloading. half-on-large These updates usually take at least a few minutes to download, so you, the user, would most likely switch back to whatever you were working on and let the updates download in the background.

But wait!

You need to type an administrator's password to install the updates. For some users, they won't know this password since they aren't an administrator on their computer. They will just have to cancel the process, AutoUpdate will pop up later on reminding them to install updates again (which they can't do). For the rest of the users who do have privileges, it's just a matter of typing the password and getting back to that paper you were typing or whatever. half-on-large

That's not all! Before installing updates, you also need to close all the apps you have open!

half-on-large

Finally..

The install process takes a minute or so, and then you're good to go. half-on-large You have to launch the application you had open before after the process completes.

Why can't this be like Google Chrome, Spotify, or pretty much every other app that just keeps itself up to date without much hassle?

Updates for Office are pushed out by Microsoft every month, and every Office user on the Mac goes through the above process for each release. Microsoft is trying to move to even faster update releases, and they are already pushing weekly updates to those who opt in.

Many hours of lost productivity and frustration are caused to users because of this unintuitive and outdated system.

There are two main issues here:

1. An administrator account is needed to install updates,

The Office suite is installed in the system-wide applications folder (/Applications), so no matter who uses the machine, they all share the same copy of office. Because of this, an administrator on the system is the only one who has write access to the applications stored there.

When you type your password before installing an update, AutoUpdate registers a "helper tool" with the operating system. This helper tool runs as the root user on the machine and copies the update files in place for the user. Once that helper tool is done installing the update, it gets unregistered from the system. All that the password prompt does is register this helper tool (which requires administrator permission).

Since the only thing that typing your password does is register a helper tool that gets unregistered later, why not just keep the tool always registered with the system? It turns out that is totally possible.

The solution

When you install Microsoft Office (and AutoUpdate), you need to type a password. At that point, I register the helper tool that can install updates as an administrator. That helper tool is never unregistered, and no matter who is trying to install updates, the helper tool will do it for them without the user ever having to type a password. Security measures are in place to ensure that only Microsoft AutoUpdate can trigger installations of update packages using the root-level helper tool.

This change was released to the public in early August as part of Microsoft AutoUpdate 3.6

2. The AutoUpdate application interrupts users while they are working, leading many people to not install updates.

Once updates can be installed without the user typing their password, it is then theoretically possible to run the entire update process silently.

After multiple months of work and refinement, here is the solution I came up with:

full

How it works

Whenever you open a Microsoft application on your machine, if you have the new "Automatically download and install" option selected, instead of the Microsoft AutoUpdate daemon just checking for updates and presenting a dialog to the user, it will instead begin downloading and installing updates in the background.

half-on-large

Once an update finishes downloading, it will check if the application(s) it pertains to are running. If so, it presents a notification to the user that an update is ready to install. If not, it will install the update immediately.

The pending updates will wait to install until their pertinent applications are closed by the user, periodically reminding users that they need to restart the running application to install updates.