I’ve recently been rolling out Office 2016 (365) for a new client with hundreds of workstations that wouldn’t accept either having all the upgrades done at the same time or having them all run at logon for various reasons, instead they wanted each user to call up when ready and we would kick the installation off. Of course this is a bit of a ridiculous situation but as the users couldn’t install the software them selves (due to permissions, sensibly so) we had to come up with another option.
The following article shows how we were able to place a shortcut on a standard users desktop that they could click to automatically uninstall Office 2010 and install Office 2016 without requiring admin details, therefore allowing the users to perform the upgrade at a time to suit them.
A couple of things to note before we begin:
- This does involve storing an admin password in a reversibly encrypted format in a share that all your users can access, use a temporary local admin account (you can use group policy to do this) and then delete it as soon as you are finished.
- The office uninstall / install process can be as quick as 20 minutes and as slow as 2 hours, I’ve seen it take over an hour on an SSD machine, don’t assume just because you have a quick machine that the process will work quickly for all users. Just make sure you warn them.
I won’t cover the setup of the Office Deployment tool in this article or the VBS script I’m using to uninstall office 2010, there are plenty of articles on both of these topics. This process will work for any install file (silent or not).
- Get everything setup
I will be using the following paths in my example, please update these with the details to your environment
Office 2016 Install Location \\Server\Office2016$ Script Files \\Server\OfficeUpgrade$ Office 2010 VBS Script \\Server\OfficeUpgrade$
Make sure the above shares have read only access for all users.
- Store the Encrypted Version of the Admin password on the server.
To achieve this we will be running the following, feel free to use a different encryption key but just make sure to keep a note of it for later. DO NOT save this script into either of the shares you created as it contains the plain text admin password.
- Setup the Script that will allow users to run the installer as an admin without credentials.
To Achieve this we will write a short PowerShell Script to call a cmd file with the actual install commands in as our already created admin user.
Save this script in the \\Server\OfficeUpgrade$ Share as nonadmin.ps1
- Setup your installer CMD.
Create a file called Office2016Install.cmd and store it in the \\Server\OfficeUpgrade$ Share. In this cmd file put your install commands for your uninstaller and installer, for example mine contains the following
- Setup a shortcut file to launch the nonadmin.ps1 file and bypass execution policy
We do this to ensure all users regardless of execution policy can run the script.
Call the shortcut Office Upgrade and have it run from the %windir%\system32\WindowsPowerShell\v1.0 directory.
- Setup a group policy preference to push the shortcut out to all client machines.
And that’s it, your users can now simply double click the shortcut when they are ready to install. They won’t need to enter an admin password.