Installed Excel VSTO add-in MSI for all terminal server users. How do I configure it for just one user?

Invantive Control and other Microsoft Office add-ins are installed as an add-in to Excel and other Office products using a MSI-file. The MSI-based Windows Installer installs an add-in based upon the VSTO technology of Microsoft (“VSTO” stands for “Visual Studio Tools for Office”). VSTO is solely available on Windows-versions of Microsoft Office; the Mac-editions of Microsoft Office do not offer VSTO add-ins.

By default, the Windows installer activates the software for all users of a device. When running on a terminal server, you might want to disable the VSTO add-in for most users and activate for specific users.

How do you configure the VSTO add-in to be available only for specific users?

Pre-cautions

This instruction is just provided as a suggestion. The procedure, possible damages and configuration on non-vanilla terminal server installations are not covered by a subscription. Configuring a terminal server requires adequate training and experience.

Please consult your local system administrator for expertise or contact Invantive or dealers for consulting on basis of Time & Material.

This topic provides a solution that involves changing registry entries in the registry for the VSTO add-ins. Please make sure you have a recoverable backup in case you might break anything.

Already using another add-in?

The steps to selectively enable Visual Studio Tools for Office (“VSTO”) add-ins on a terminal server is typically identical across all Invantive and non-Invantive add-ins.

Please first consider use of a working procedure you already have grown accustomed to for other VSTO add-ins supplied by 3rd parties.

Steps to Configure VSTO for One User

Perform the following steps to configure the VSTO add-in to run for solely one user:

  • Click the Windows icon of the start menu.
  • Enter regedit.exe to start the registry editor.
  • Navigate to the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Office\Excel\Addins\Invantive Control for Excel:
  • Export the registry key using the File menu.
  • Save the file on your desktop.
  • Open the registry export file in notepad. It should resemble:
    VSTO registry key with LoadBehavior
  • Change the value of the LoadBehavior key in the registry to 0. Changing the value to 0 will disable the add-in for all users. A list of values for load behavior is provided at the end of this topic.
  • Change the name of the registry from HKEY_LOCAL_MACHINE into HKEY_CURRENT_USER.
  • Distribute this file to the user that needs to have the add-in enabled.
  • Log in as the user that needs to have the VSTO add-in enabled.
  • From that user account, run the registry file you have edited in the previous step by double-clicking it.
  • Log out.
  • Log in in again as the user.
  • The add-in should load for users that have the registry file installed.
  • Check that Excel starts Invantive Control for Excel on startup. The startup is displayed at the bottom of the Excel splash screen.
  • Log in as another user.
  • Check that Excel does not start Invantive Control for Excel.

Load behaviors

The load behavior controls whether and how a VSTO add-in is loaded upon the startup of the Microsoft Office software. A VSTO add-in creates a so-called app domain, available of executing software targeting the Microsoft .net platform.

There is a wide range of values available for the load behavior of the add-in software (typical values are 0 and 3).

The load behavior is controlled through registry keys. Typically per add-in a registry key exists with a number of values, including load behavior.

Load behavior Value Meaning Description
0 Unloaded, do not load automatically The application never tries to load the VSTO Add-in automatically. The user can try to manually load the VSTO Add-in, or the VSTO Add-in can be loaded programmatically. If the VSTO Add-in is successfully loaded, the LoadBehavior value remains 0, but the status of the VSTO Add-in in the COM Add-ins dialog box is updated to indicate that the VSTO Add-in is loaded.
1 Loaded, do not load automatically The application never tries to load the VSTO Add-in automatically. The user can try to manually load the VSTO Add-in, or the VSTO Add-in can be loaded programmatically. Although the COM Add-ins dialog box indicates that the VSTO Add-in is loaded after the application starts, the VSTO Add-in isn’t loaded until it is loaded manually or programmatically. If the application successfully loads the VSTO Add-in, the LoadBehavior value changes to 0, and remains at 0 after the application closes.
2 Unloaded, load at startup The application does not try to load the VSTO Add-in automatically. The user can try to manually load the VSTO Add-in, or the VSTO Add-in can be loaded programmatically. If the application successfully loads the VSTO Add-in, the LoadBehavior value changes to 3, and remains at 3 after the application closes.
3 Loaded, load at startup The application tries to load the VSTO Add-in when the application starts. This is the default value when you build or publish a VSTO Add-in in Visual Studio. If the application successfully loads the VSTO Add-in, the LoadBehavior value remains 3. If an error occurs when loading the VSTO Add-in, the LoadBehavior value changes to 2, and remains at 2 after the application closes.
8 Unloaded, load on demand The application does not try to load the VSTO Add-in automatically. The user can try to manually load the VSTO Add-in, or the VSTO Add-in can be loaded programmatically. If the application successfully loads the VSTO Add-in, the LoadBehavior value changes to 9.
9 Loaded, load on demand The VSTO Add-in will be loaded only when the application requires it, such as when a user clicks a UI element that uses functionality in the VSTO Add-in (for example, a custom button in the Ribbon). If the application successfully loads the VSTO Add-in, the LoadBehavior value remains 9, but the status of the VSTO Add-in in the COM Add-ins dialog box is updated to indicate that the VSTO Add-in is currently loaded. If an error occurs when loading the VSTO Add-in, the LoadBehavior value changes to 8.
16 Loaded, load first time, then load on demand Set this value if you want your VSTO Add-in to be loaded on demand. The application loads the VSTO Add-in when the user runs the application for the first time. The next time the user runs the application, the application loads any UI elements that are defined by the VSTO Add-in, but the VSTO Add-in is not loaded until the user clicks a UI element that is associated with the VSTO Add-in. When the application successfully loads the VSTO Add-in for the first time, the LoadBehavior value remains 16 while the VSTO Add-in is loaded. After the application closes, the LoadBehavior value changes to 9.