Dmitry Kostochko

HowTo: Install a COM add-in automatically using Windows Server Group Policy

Every successful development project ends with its installation. This post will be useful for developers as well as for domain administrators. Here you will get to know how to use Windows Server 2000 – 2008 Group Policy for deploying and installing applications automatically, including automatic installation of COM add-ins for Microsoft Office. This technology makes corporate deployment of your Office COM add-ins a gain with no pain.

Let's proceed to step-by-step instructions on how to use Group Policy to automatically distribute a COM add-in to domain users.

Create a Distribution Point

To install an add-in, you need to create a distribution point on a publishing server:

    1. Log on to a Windows Server as an administrator.
    2. Create a shared network folder where you will place the MSI package that you want to install.
    3. Set permissions on the share to allow access to the installation package.
    4. Copy the MSI package to the distribution point.

Create a Group Policy object in Windows Server 2000 and 2003

Use a Group Policy object (GPO) to install the software package. Here are 9 easy steps to create it:

    1. Start the Active Directory Users and Computers snap-in (Start -> All Programs -> Administrative Tools -> Active Directory Users and Computers).
    2. Right-click on your domain in the console tree, and then choose Properties.
    3. Switch to the Group Policy tab, and then click New.
    4. Type the name you want for this policy (e.g. My Addin Distribution), and then press ENTER.
    5. Click Properties, and then switch to the Security tab.
    6. Click the Add button to add security groups or users to the list.
    7. Unselect the Apply Group Policy check box for those groups or users that you don't want this policy to apply to.
    8. Select the Apply Group Policy check box for the groups or users that you want this policy to apply to.
    9. When you get through, click OK.

Create a Group Policy object in Windows Server 2008

To create a Group Policy object (GPO) that you'll use to install the software package:

    1. Start the Group Policy Management snap-in (Start -> Administrative Tools -> Group Policy Management).
    2. Right-click on your domain in the console tree, and then choose Create a GPO in this domain, and Link it here.
    3. Type the name you want to call this policy (e.g. My Addin Distribution), and click OK.
    4. Expand the Group Policy Objects item and select the newly added policy.
    5. Click the Remove button to delete the Authenticated Users security group.
    6. Click the Add button to add security groups or users.

Assign the installation package

To assign software to users that are logging on to Windows 2000 and higher workstations:

    1. Windows Server 2000/2003. Start the Active Directory Users and Computers snap-in.
    Windows Server 2008. Start the Group Policy Management snap-in.
    2. Windows Server 2000/2003. Right-click your domain in the console tree, click Properties, switch to the Group Policy tab, select the group policy object that you want, and then click Edit.
    Windows Server 2008. Locate and expand your domain in the console tree, then expand Group Policy Objects, right-click on the group policy object that you want, and then click Edit.
    3. The Group Policy Object Editor will start.
    4. Windows Server 2000/2003. Expand Software Settings under User Configuration.
    Windows Server 2008. Under User Configuration, expand Policies, then Software Settings.
    5. Right-click Software installation, point to New, and then click Package.
    6. In the Open dialog box, type the full Universal Naming Convention (UNC) path to the shared folder with the MSI package that you want (e.g. \\server\share\setup.msi).
    Warning. If the Windows Installer file resides on the local hard disk, do not use a local path. You need to use the UNC path to indicate the location of the installation files.
    7. Click Open.
    8. Click Assigned, and then click OK. The package will be listed in the right pane of the Group Policy window.
    9. Right-click the package, click Properties, switch to the Deployment tab.
    10. Select the Install this application at logon check box, and click OK.
    11. Close the Group Policy Editor, then quit the Active Directory Users and Computers or Group Policy Management snap-in. When the user logs on, the managed software package is automatically installed.

Remove the installation package

To remove a package:

    1. Windows Server 2000/2003. Start the Active Directory Users and Computers snap-in.
    Windows Server 2008. Start the Group Policy Management snap-in.
    2. Windows Server 2000/2003. Right-click your domain in the console tree, click Properties, switch to the Group Policy tab, select the group policy object that you want, and then click Edit.
    Windows Server 2008. Locate and expand your domain in the console tree, then expand Group Policy Objects, right-click on the group policy object that you want, and then click Edit.
    3. The Group Policy Object Editor opens.
    4. Windows Server 2000/2003. Expand Software Settings under User Configuration.
    Windows Server 2008. Under User Configuration, expand Policies, then Software Settings.
    5. Select the Software installation container with the package.
    6. In the right pane of the Group Policy window, right-click the package, point to All Tasks, and then click Remove.
    7. Click Immediately uninstall the software from users and computers, and then click OK.
    8. Close the Group Policy Editor, then quit the Active Directory Users and Computers or Group Policy Management snap-in.

NOTE: Such kind of installation requires client computers that run Microsoft Windows 2000 and higher.

By using the steps above, you can create an automatic installer for your Office 2007 – 2000 COM add-in, in this way making the deployment and installation as easy as they can possibly be.

You can download Microsoft Office Excel and Word add-in samples now by using one of the links below. You'll find setup projects within the Visual Studio solutions.

You may also be interested in:

Deploying Add-in Express based Office COM addins
ClickOnce solution for add-in deployment

Available downloads:

The sample add-ins below were written using Add-in Express for Office and .net

C# sample add-in for VS 2005  
VB.NET sample add-in for VS 2005

8 Comments

  • Chip says:

    Thanks for the article. Question: does the installation proceed under the credentials of the user logging in? I am facing a problem where it seems the installer runs, but perhaps has some kind of permissions problem. In the application logs seems to indicate success, but the addin is not really installed? Are there any logs for the installation, either on the local machine or on the domain controller? Thanks.

  • Dmitry Kostochko (Add-in Express Team) says:

    Yes, the installation proceeds under the credentials of the user logging in. You can find the log file generated by Add-in Express in the Documents\Add-in Express\adxloader.log file.

  • Thomas Darde says:

    We are struggling to find a solution for the deployment of an Outlook (Add-in Express) Addin for a TSE Server.
    Could installing the add-in at the machine level be a solution ? Will it work ?

    Any instructions would be greatly appreciated.

  • Andrei Smolin (Add-in Express Team) says:

    Hello Thomas,

    There’re downsides: 1) you need to have administrative permissions, 2) to update/uninstall the add-in you need all users to close the host application. What problems are you having? You could send an email to support so that we could try to help; please see the contact form at https://www.add-in-express.com/support/askus.php.

  • john stegenga says:

    Can a group policy be used to deploy manifest based add-ins when exchange version is 2010 and so not supported by EAC?

  • Andrei Smolin (Add-in Express Team) says:

    Hello John,

    I’m sorry, as COM add-in developers we can’t answer this question. I suggest that you google for an answer.

  • john stegenga says:

    Thanks Andrei. Microsoft says support for com addins is going away. I did google, found your site here. Google not helpful in this area. but thank you much for replying

  • hasan says:

    tank you

Post a comment

Have any questions? Ask us right now!