Our parent company from a recent acquisition handles it’s deployment in a way that doesn’t meet our requirements, since it is user-based rather than computer based which we require.
There were a few things we had to define for this to be a successful project:
- Installation must run under admin privileges (which our users do not have)
- Ideally, installation should not interrupt or delay a user, but if necessary it is acceptable
- Install source should be dynamic to allow for different branch locations
- Success or failure should be logged to a central file
Based on the above, I came up with a combination of scripts which are reproduced below.
Overall the project was a success, with the only major issue being users not reading instructions (even openly admitting this fact) which caused a huge increase in IT Support requests.
1. Group Policy Objects
I set up two GPO’s to perform two separate functions:
- One to create a Scheduled Task that runs once at 3:00am, executing the install script
- One to execute the install script as a Startup Script under the Computer Configuration settings for all workstations in our area of AD
Using this method, any computer powered on at deployment date would receive Office 2013 at 3:00am without user interruption, and any other computer after that would receive it at startup. The majority of our staff working in an office were not interrupted, and our field staff would all receive the software eventually.
2. Installation Script
My commented installation script can be downloaded here: Office2013InstallStatus (rename to .bat)
In essence, here is what it does:
- Begin by defining location variables that will apply to all PCs by default
- Check matching NIC gateway addresses for offices without an Apps repository and overwrite the location variables if necessary
- This will ensure that all installation files come from a local source
- Note that the LogFile variable is not changed; central to all installations
- Next a check occurs for Office 2013 installation
- If this returns true, the script will exit without further action
- If Office 2013 isn’t already installed, installation will begin
- First write a registry entry on the PC which can be referenced by the Install Status Script (see below) if the user happens to log on during installation
- Uninstall Office 2010 (a straight upgrade has been known to cause problems)
- Uninstall Office 2013 (this will apply to PCs which had ONLY Lync installed)
- Install Office 2013
- Write result to a Log File
- Reset the registry entry of installation status to signify end of installation
- Exit script
3. Install Status Script
Because many of our installations would take place at computer Startup (the second GPO) and it would be possible for users to log onto the computer before the installation is completed (because Windows 7 doesn’t run startup scripts synchronously), I needed a way to tell the user not to open Office products while the installation was running.
My status script can be downloaded here: Office2013StartupScript (rename to .vbs)
This script is placed within all users Startup folder in the start menu, and performs the following:
- Read the InstallingStatus value from the registry which would be set by the Office2013StartupScript.bat script
- If the Status = 0, exit the script. If it = 1, begin a Do loop
- While in the loop, check for the status of the registry key again
- If Status = 1, display the HTA application. This has a timeout of 5 minutes, after which the loop will resume
- If Status = 0, the loop ends and a final message is displayed to the user
One problem we did encounter (which isn’t really resolved yet) is that occasionally the Office 2013 installer would auto-reboot. When this occurred, it interrupted this status script, causing the “installingStatus” flag to remain active. On the next reboot, the Status window would re-appear even though no installation was taking place.
4. Install Status Window (HTA)
The HTA file I’m using to display to the user, called from the Status Script, can be downloaded here: Office2013_message(rename to .hta)