Thursday 28 February 2013

Office 2013 - GPO Group Policy Installation (and upgrade to x64 bit at the same time)

With Office 2010 (and possibly 2007 - I never installed that via GPO) Microsoft has made it more difficult to install Office via GPO.  With Office 2003 we could just add the MSI as an installation package in a Computer/User GPO.

The task is now accomplished with a computer startup script or user logon script (still configured via Group Policy).  I was forced to opt for a computer startup script since logon scripts run as the user and our users do not have rights to install applications on their machines.

Prerequisites:
  1. Office 2013 Installation media/ISO
  2. A convenient network location to store the setup files (preferably a DFS share if installing on multiple sites)
  3. An AD Group or OU to assign the 2013 Installation GPO to
RANT: Why can I not simply upgrade to Office 2013 x64 from a previous Office that is x86?  Attempting to do so brings up this error:
Really? Why not just remove them as part of the installer?
So the script will need to detect and remove any existing x86 versions of Office just so that we can install the x64 version.  Following Microsofts instructions at http://technet.microsoft.com/en-us/library/ff602181.aspx will work fine if you do not mix environments and are upgrading an x86 version of Office 2003 to x86 Office2013.  If you are moving from x86 to x64 (which you should be) then the silent installer will just hang at the point it finds x86 versions running on the machine.

How to install Office 2013 via GPO Guide:

  • Copy your install files to a share e.g. \\MyFileServer\Office2013
  • You can create an installation answer file (.msp) and save it into the "Updates" folder to fully customise the installation of Office 2013
    • Type \\MyFileServer\Office2013\setup.exe /admin
    • This will bring up the Office 2013 installation config tool.  There are loads of settings to pre-configure in here
  • Edit the config.xml file in the Standard.WW/ProPlus.WW/whatever.WW folder (items marked in RED are things to change/ensure they match your setup):
<Configuration Product="Standard">
<!-- <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" /> -->
<!-- <Logging Type="standard" Path="%temp%" Template="Microsoft Office Standard Setup(*).txt" /> -->
<!-- <USERNAME Value="Your Name" /> -->
<!-- <COMPANYNAME Value="Your Company" /> -->
<!-- <INSTALLLOCATION Value="%programfiles%\Microsoft Office" /> -->
<!-- <LIS CACHEACTION="CacheOnly" /> -->
<!-- <LIS SOURCELIST="\\MyFileServer\Office2013" /> -->
<!-- <DistributionPoint Location="\\MyFileServer\Office2013" /> -->
<!-- <OptionState Id="OptionID" State="absent" Children="force" /> -->
<!-- <Setting Id="SETUP_REBOOT" Value="IfNeeded" /> -->
<!-- <Command Path="%windir%\system32\msiexec.exe" Args="/i \\server\share\my.msi" QuietArg="/q" ChainPosition="after" Execute="install" /> -->
</Configuration>


GPO Installation script


Download: Office 2013 Install Script (InstallOffice2013.zip)
Open the script and replace the \\MyFileServer\Office2013 UNC paths with your own server name and share name.
What the script does

  • Detects if the is a x86 or x64bit system, if its an x86 system then exits (though this could be configured to run an x86 Office 2013 installer here if needed).
  • Removes the Office 2007 compatibility pack
  • Removes Office 2010 x86 version
  • Removes Office 2003 x86 version
  • Reboots the PC if required
  • Installs Office 2013

Install via startup or logon script

You can either run the cmd file above in your normal logon script (assuming users have admin rights to their machines) or you can deploy via a computer startup script in Group Policy
Instructions for the latter can be found here: http://technet.microsoft.com/en-us/library/cc779329(v=ws.10).aspx

3 comments:

  1. I want to install Office 2016 Pro Plus x86 and uninstall Office 2013 (x86 and x64) versions using the script.

    ReplyDelete
  2. I like your blog, your blog is so good and beneficial for all, i read your blog. I was search like this blog. after read this blog i fully satisfied and happy.
    http://www.officesetup.support

    ReplyDelete