Deploy Template Designer silently

As an IT administrator, you can deploy Docentric Template Designer 7.0 and later without user interaction, using standard Windows Installer commands. This article shows you how to install, upgrade, and uninstall the add-in silently.

Run all commands from an elevated command prompt, or through a deployment agent running in the system context. Docentric Template Designer installs per machine and requires local administrator rights.

To install Docentric Template Designer interactively on a single workstation, follow Install Docentric Template Designer instead.

Prerequisites

  • Windows operating system.
  • Microsoft Office desktop edition, version 2019 or higher, including Microsoft Word.
  • Microsoft .NET Framework 4.7.2 or later. The installer checks this requirement and stops if it isn't met.
  • Local administrator rights on the target computer.
  • Microsoft Word and Microsoft Excel closed on the target computer. If Office applications are running, files may be locked, and the installation can request a restart or fail.
IMPORTANT

If you use both products, Docentric CE and Docentric AX, be aware of a temporary incompatibility between their respective Docentric Template Designer versions. Docentric CE uses the new Docentric Template Designer version 7.0, while Docentric AX still requires Docentric Template Designer 6.1.

Two versions of the Docentric Template Designer cannot be installed on the same machine, and if you need to be able to design document templates for Docentric AX and Docentric CE, you must have both versions of Docentric Template Designer installed, each on a different (virtual) machine. This limitation is temporary, and will be lifted with the release of the upcoming major release of Docentric AX.

Configure deployment tool settings

Command settings for deployment tools

Use the following settings:

Setting Value
Install command msiexec /i "ReportDesignerSetup-7.0.msi" /qn /norestart ADDLOCAL=DesignerAddInWord
Upgrade command msiexec /i "ReportDesignerSetup-7.1.msi" /qn /norestart
Uninstall command msiexec /x {ProductCode} /qn /norestart
Install behavior System
Restart behavior No specific action. Treat 3010 as a soft reboot.

Set up a detection rule

Use one of the following detection rules:

  • MSI product code detection, using the ProductCode of the version you deploy.
  • Registry detection on HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{ProductCode}, value DisplayVersion.
NOTE

The package is 32-bit, so its registration is written under WOW6432Node on 64-bit Windows. A detection rule that targets only the 64-bit registry view won't find the product.

Because the ProductCode changes with each release, update the detection rule whenever you package a new version. The add-in registration under HKLM\SOFTWARE\Microsoft\Office\Word\AddIns\Docentric Designer is version-independent, and you can use it as a supplementary check.

Review the installation package

Docentric Template Designer is distributed as a Windows Installer package (.msi).

Property Value
Package file ReportDesignerSetup.msi
Installer type Windows Installer (MSI), 32-bit package
Add-in type VSTO add-in (Visual Studio Tools for Office)
Installation scope Per machine (all users), HKEY_LOCAL_MACHINE registry tree
Default install folder C:\Program Files (x86)\Docentric\Docentric Designer OfficeAddIn\Word AddIn\
Office bitness One package supports both 32-bit and 64-bit Microsoft Word
UpgradeCode {1F759956-5009-45E8-B77E-C12F9BF8A334}

The installer automatically registers the Word add-in for 32-bit and 64-bit Microsoft Word on every installation, so you don't need separate packages or download links for the two bitnesses.

Install Docentric Template Designer silently

Install the add-in for the first time by running the base command with the ADDLOCAL parameter, which selects the Word add-in feature.

  1. Open an elevated command prompt, or run the command through a deployment agent in the system context.

  2. Run the install command:

    msiexec.exe /i "ReportDesignerSetup-7.0.msi" /qn /norestart ADDLOCAL=DesignerAddInWord /L*v "%WINDIR%\Temp\docentric-install.log"
    

The command uses these parameters:

Parameter Purpose
/i Install the specified package.
/qn No user interface.
/norestart Suppress any restart. The installation returns 3010 if a restart is required.
ADDLOCAL=DesignerAddInWord Select the Microsoft Word add-in. Required on first installation.
/L*v <path> Write a verbose log file. Recommended for all unattended runs and it's the first item Docentric support asks for.
IMPORTANT

Always pass ADDLOCAL=DesignerAddInWord when you install for the first time. If you omit it, the installation still reports success, but it doesn't install the Microsoft Word add-in.

Use the full path to the .msi file, or run the command from the folder that contains it. A relative file name resolves against the current working directory, which in an elevated command prompt is C:\Windows\System32.

Available features

Feature name Description
DesignerAddInWord Docentric Designer add-in for Microsoft Word.

The Microsoft Excel add-in is currently released as a preview and isn't covered in this article. Contact Docentric support before you consider deploying it for previewing.

Upgrade Docentric Template Designer silently

To upgrade Docentric Template Designer, install the newer package. The installer detects the previous version through the UpgradeCode, removes it, and installs the new version in one operation. You don't need to uninstall the earlier version first.

  1. Open an elevated command prompt.

  2. Run the upgrade command:

    msiexec.exe /i "ReportDesignerSetup.msi" /qn /norestart /L*v "%WINDIR%\Temp\docentric-upgrade.log"
    
IMPORTANT

Don't pass ADDLOCAL when you upgrade. Without it, the installer carries forward the feature selection already present on the computer. If you pass ADDLOCAL during an upgrade, it overrides the existing selection, and any feature that isn't listed is removed.

Uninstall Docentric Template Designer silently

Uninstall by ProductCode. The ProductCode identifies one specific version, so find the value that matches the version installed on the computer before you uninstall. See Find the installed ProductCode.

  1. Run the uninstall command with that ProductCode:

    msiexec.exe /x {ProductCode} /qn /norestart /L*v "%WINDIR%\Temp\docentric-uninstall.log"
    

If the original .msi file (or one with the same ProductCode) is available, reference the package instead:

msiexec.exe /x "ReportDesignerSetup.msi" /qn /norestart /L*v "%WINDIR%\Temp\docentric-uninstall.log"

Find the installed ProductCode

Read the ProductCode from the uninstall registry key. Because the package is 32-bit, the entry is located under WOW6432Node:

$key = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'

Get-ItemProperty $key |
    Where-Object DisplayName -like '*Docentric Template Designer*' |
    Select-Object DisplayName, DisplayVersion, PSChildName

The PSChildName value is the ProductCode.

Review MSI reference values

MSI identifiers

Docentric Template Designer uses the standard Windows Installer identifiers.

Identifier Value Use
ProductCode Unique per version Identifies one installed version. Use it for uninstallation and repair, and as an Intune or Configuration Manager detection rule.
PackageCode Regenerated for every build Identifies the physical .msi file. Not used for deployment.
UpgradeCode {1F759956-5009-45E8-B77E-C12F9BF8A334} Stable across all versions. The installer uses it to detect and replace earlier versions. Use it to look up the installed ProductCode.

Add-in registration reference

Because Docentric Template Designer is a VSTO add-in rather than a COM add-in, it has no ProgID. Microsoft Office identifies it by the registry key name instead:

Docentric Designer

Use this name wherever an add-in identifier is required. For example, in the Group Policy list of managed add-ins, or when you control the add-in through the Office object model.

The registration is written to both registry views:

  • HKLM\SOFTWARE\Microsoft\Office\Word\AddIns\Docentric Designer (64-bit Word)
  • HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\Word\AddIns\Docentric Designer (32-bit Word)

Both keys contain the same six values:

Value Type Data
FriendlyName REG_SZ Docentric Designer for Microsoft Word
Description REG_SZ Docentric Designer for Microsoft Word
InstallDir REG_SZ C:\Program Files (x86)\Docentric\Docentric Designer OfficeAddIn\Word AddIn\
LoadBehavior REG_DWORD 3
Manifest REG_SZ file:///C:\Program Files (x86)\Docentric\Docentric Designer OfficeAddIn\Word AddIn\Docentric.Toolkit.Reporting.Word.AddIn.vsto\|vstolocal
CommandLineSafe REG_DWORD 0

Troubleshoot the deployment

Confirm that the add-in loads in Microsoft Word

  1. Start Microsoft Word and confirm that the Docentric ribbon tab is present.

  2. Read the LoadBehavior value:

    reg query "HKLM\SOFTWARE\Microsoft\Office\Word\AddIns\Docentric Designer" /v LoadBehavior
    
LoadBehavior Meaning
0 The add-in is disabled by policy or administrator.
3 The add-in is set to load at startup and is currently loaded. This is the expected value.
2 Microsoft Word attempted to load the add-in and didn't succeed, or a user disabled it. See Docentric ribbon tab missing.

Docentric ribbon tab missing in Microsoft Word

Cause: Microsoft Word tried to load the add-in and didn't succeed, or the add-in was disabled for the user. A per-user setting overrides the machine-wide registration. The add-in is disabled either manually in File > Options > Add-ins, or automatically after a failure to load.

Resolution:

  1. Check LoadBehavior in the registry view that matches the installed Microsoft Word architecture. A value of 2 means Microsoft Word tried to load the add-in and didn't succeed.

    reg query "HKLM\SOFTWARE\Microsoft\Office\Word\AddIns\Docentric Designer" /reg:32 
    reg query "HKLM\SOFTWARE\Microsoft\Office\Word\AddIns\Docentric Designer" /reg:64 
    
  2. Under the affected user account, check the per-user setting. If a per-user LoadBehavior of 2 is present, the add-in was disabled for that user.

    reg query "HKCU\SOFTWARE\Microsoft\Office\Word\AddIns\Docentric Designer"
    
  3. Check whether Microsoft Word placed the add-in in its disabled items list:

    reg query "HKCU\SOFTWARE\Microsoft\Office\16.0\Word\Resiliency\DisabledItems"
    

    Reenable the add-in in Word via File > Options > Add-ins > Disabled Items.

Successful installation with nothing installed

Cause: ADDLOCAL was omitted on a first installation.

Resolution:

  1. Run the installation again with ADDLOCAL=DesignerAddInWord.

Failed installation or restart request

Cause: Microsoft Word or Microsoft Excel is running and locks files, or a restart is already pending on the computer.

Resolution:

  1. Confirm that Microsoft Word and Microsoft Excel are closed, and that no restart is already pending on the computer.
  2. Restart the computer.
  3. Repeat the installation.

Exit code 1605 on uninstallation

Error message: Exit code 1605

Cause: The ProductCode doesn't match any installed product.

Resolution:

  1. Use the script in Find the installed ProductCode to resolve the ProductCode of the version that's actually installed.

Get help

If a deployment doesn't complete as expected, collect the verbose log file produced by the /L*v switch and contact Docentric support. The log identifies the exact point of failure and shortens the time needed to resolve the issue.