OfficeDeploymentTool

From Piszczynski

Office Deployment Tool

For installing Microsoft office in an enterprise environment it may be more suitable to use the office deployment tool rather than the standard installer downloaded from the office website.

The Office deployment tool allows for an automated installation with options.

See documentation here: https://docs.microsoft.com/en-gb/deployoffice/overview-office-deployment-tool

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


Configuration and Use

The ODT requires the configuration of an xml file to run.

The tool itself is run from the command line with the following command - run in the same directory as teh setup.exe and configuration xml file (run as admin): First download the required packages:

  • .\setup.exe /download .\configXmlFile.xml

Then Install:

  • .\setup.exe /configure .\configXmlFile.xml

The tool can also be used to download the install package using the /download switch and an xml file.

You can get a file generated with this tool if you do not want to create it yourself:

https://config.office.com/deploymentsettings

Example xml file


<Configuration>

  <Add OfficeClientEdition="64" Channel="Current">
    <Product ID="O365ProPlusRetail">
      <Language ID="en-GB" />
      <ExcludeApp ID="Groove" />
      <ExcludeApp ID="Lync" />
      <ExcludeApp ID="Teams" />
      <ExcludeApp ID="OneDrive" />
      <ExcludeApp ID="OneNote" />
    </Product>
    
  </Add>
  <Display Level="None" AcceptEULA="TRUE" />
  <Property Name="SharedComputerLicensing" Value="1" />

</Configuration>

This will configure the install to use the en-gb language with some of the apps excluded from install with the shared licences active.

The shared licences is useful for any servers that have multiple users and are compatible with the O365 enterprise licences (E3 + E5 etc)

The display level sets if the user of the computer will see the installer and if they are required to accept the EULA

To install from a network or local location you will need to run the /download command first specifying the location/path in the "Add" section:


<Add SourcePath="\\server\networkshare "OfficeClientEdition="64" Channel="Current">

The sourcepath will then need to be specified in the xml file used when installing using the /configure switch.

After Installation configuration

After installing you can update the Office behavior - use the following commands to update/change:

rem Mount the default user registry hive
reg load HKU\TempDefault C:\Users\Default\NTUSER.DAT
rem Must be executed with default registry hive mounted.
reg add HKU\TempDefault\SOFTWARE\Policies\Microsoft\office\16.0\common /v InsiderSlabBehavior /t REG_DWORD /d 2 /f
rem Set Outlook's Cached Exchange Mode behavior
rem Must be executed with default registry hive mounted.
reg add "HKU\TempDefault\software\policies\microsoft\office\16.0\outlook\cached mode" /v enable /t REG_DWORD /d 1 /f
reg add "HKU\TempDefault\software\policies\microsoft\office\16.0\outlook\cached mode" /v syncwindowsetting /t REG_DWORD /d 1 /f
reg add "HKU\TempDefault\software\policies\microsoft\office\16.0\outlook\cached mode" /v CalendarSyncWindowSetting /t REG_DWORD /d 1 /f
reg add "HKU\TempDefault\software\policies\microsoft\office\16.0\outlook\cached mode" /v CalendarSyncWindowSettingMonths  /t REG_DWORD /d 1 /f
rem Unmount the default user registry hive
reg unload HKU\TempDefault

rem Set the Office Update UI behavior.
reg add HKLM\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /v hideupdatenotifications /t REG_DWORD /d 1 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate /v hideenabledisableupdates /t REG_DWORD /d 1 /f

Office Updates

Manually check for and install office updates with the following command:

  • "C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe" /update user

Perform command hidden from users:

  • "C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe" /update user displaylevel=false forceappshutdown=false

Office Activation Issues

See the following guide for office activation reset:

https://learn.microsoft.com/en-us/office/troubleshoot/activation/reset-office-365-proplus-activation-state