Microsoft Office 365 is a pain to install manually. Make a customized silent installer to install with a single command! Installing with this method will allow you to deploy a standard unlicensed instance of Office. Users will be prompted to login with their Office 365 account the first time they launch an Office application. User login will apply the appropriate license.

First, download the Office Deployment Tool here:

https://www.microsoft.com/en-us/download/details.aspx?id=49117

office

Run the resulting file.

office

Accept the License Agreement, I guess–sure; why not–and choose a location to extract files to.

office

So far so good.

office

And that’s all the Office Deployment Tool does. It just extracts these files. Find the resulting files.

office

This setup.exe file will download and install the latest click-to-run version of Office365. Run the setup.exe with the /configure handle followed by an .xml file in the Windows CLI to deploy a customized installer.

For example:

setup.exe /configure configuration-Office365-x64.xml  

Customize the .xml file as needed. Here is an example of a file that will install the 64-bit version of Office, update on the monthly channel, exclude Teams, OneDrive, and Skype applications, and include Visio.

<Configuration>
  <Add OfficeClientEdition="64" Channel=" MonthlyEnterprise ">
	<Product ID="O365ProPlusRetail">
	  <Language ID="en-us" />
	  <ExcludeApp ID="Teams"/>
	  <ExcludeApp ID="Groove" />
	  <ExcludeApp ID="Lync" />
	</Product>
	<Product ID="VisioProRetail">
	  <Language ID="en-us" />
	</Product>
  </Add>
  <Display Level="None" AcceptEULA="TRUE" />
  <Property Name="AUTOACTIVATE" Value="1" />
</Configuration>

configuration-Office365-x64.xml

The x64 or x86 in the .xml file name don’t really do anything. These are just templates. The OfficeClientEdition tag can be set to “32” or “64.” This tag actually controls which version is installed.

<Add OfficeClientEdition="64" Channel="Monthly">  

“Channel” in this tag sets the update channel. These are the options for update channel:

  • Channel=”BetaChannel”
  • Channel=”CurrentPreview”
  • Channel=”Current”
  • Channel=”MonthlyEnterprise”
  • Channel=”SemiAnnualPreview”
  • Channel=”SemiAnnual”

For a silent install with no on screen interface use this tag:

<Display Level="None" AcceptEULA="TRUE" />

There are only two options for Display Level.

  • None
  • Full

You can exclude an application from your install with the “ExcludeApp ID” tag. These are the IDs for applications that you can use in the “ExcludeApp ID” tag:

  • ID=”Access”
  • ID=”Excel”
  • ID=”Groove”
  • ID=”Lync”
  • ID=”OneDrive”
  • ID=”OneNote”
  • ID=”Outlook”
  • ID=”PowerPoint”
  • ID=”Publisher”
  • ID=”Teams”
  • ID=”Word”

Per Microsoft: “For OneDrive for Business, use Groove. For Skype for Business, use Lync.”

AutoActivate does what you would expect. Set to “1” to enable autoactive. Set to “0” to disable autoactivate.

<Property Name="AUTOACTIVATE" Value="1" />

AcceptEULA also does what you would expect. Set it to TRUE.

<Display Level="None" AcceptEULA="TRUE" />

Add additional Office products with these tags. Visio, for example is not included in the standard Office install.

</Product>
<Product ID="VisioProRetail">
  <Language ID="en-us" />
</Product>

You can install Project with the same method:

</Product>
<Product ID=" ProjectProRetail ">
 <Language ID="en-us" />
</Product>

There are lots of other options, but these are all you need to make a silent installer. Kick off installation with this command in the Windows CLI with your customized file:

setup.exe /configure configuration-Office365-x64.xml

You can combine this silent installer with PsExec to install to a remote PC across network!

Update! If there are any 32-bit Office products installed, the 64-bit installer will fail silently with no error message. Same goes for the reverse, if there are any 64-bit Office products installed the 32-bit installer will fail. Running the GUI installer produces a descriptive error message, but the silent installer is, well, silent. If the installer is failing, make sure there are no Office products of the wrong architecture installed. This includes Microsoft Access Database Engine 2016, Visio, and Project but does not seem to include Microsoft Visual C++ Redistributable.

Further Reading:
https://docs.microsoft.com/en-us/deployoffice/office-deployment-tool-configuration-options

https://docs.microsoft.com/en-us/sysinternals/downloads/psexec