Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

VSTO Add-in Installation - Multiple Users

Latest post Tue, Mar 9 2010 1:03 AM by mathias.brandewinder. 5 replies.
  • Fri, Aug 22 2008 1:41 AM

    • Mattheq
    • Top 25 Contributor
    • Joined on Wed, Apr 23 2008
    • Perth, Australia
    • Posts 37
    • Points 568

    VSTO Add-in Installation - Multiple Users

    Greetings.

    This is not a question, but relates to my (successful!?) experience creating and installing an Excel add-in using VSTO, VS2005 Professional, VSTO 2005 SE for Windows XP and Office 2003 for multiple users.  While this may be old news to some people, I haven't come across 'plain English' explanations of how to achieve this anywhere else.

    I had heard that VSTO COM add-ins could not be installed for multiple users on XP (I am not sure if this is valid for Vista, but am soon to find out!).  The "not a valid Office Add-in" dialog is not a sight I plan to see again, as I finally stumbled on the solution to a successful installation (of sorts) for my COM add-in for all users in Windows XP.  While far from elegant, it satisfies the requirements of the application distribution until I can learn more about it and discover the 'right' way to go about creating the installer.

    Requirements for Installation of a VSTO Add-in for multiple users on Windows XP:

    • In the installer project, ensure that there are no unneccessary Registry Keys.  The Keys I used to install are:
      • HK_CURRENT_USER
        • Software
          • Classes
            • CLSID (This key is setup by the installer)
              • <CLSID Value>
                • InprocServer32 (Values set by VS2005)
                • ProgID (Values set by VS2005)
                • Programmable (Values set by VS2005)
                • VersionIndependentProgID (Values set by VS2005)
            • MyProject
              • CLSID
                • (Default) = <CLSID Value>
          • Microsoft
            • Office
              • Excel
                • Addins
                  • MyProject
                    • CommandLineSafe = 1
                    • Decsription = "MyProject"
                    • FriendlyName = "MyProject"
                    • LoadBehavior = 3
                    • Manifest = "[TARGETDIR]MyProject.dll.manifest"
    • If you have any other registry keys in your installer project, delete them.  I found that the existence of any other keys caused my add-in to display the "not a valid Office add-in" dialog.
    • User has to be logged in as an administrator on the local machine.
    • If the add-in is already installed, uninstall it.  You may be offered the choice of repairing the installation. Repairing did not work for me.
      • Due to the uninstall not cleaning itself up properly, it does not delete existing registry keys for other users on the same machine.
      • Re-installing does not affect functionality for other users on the same machine.

    Administration of the Add-in:

    • I have had to involve the Network Administrator in deployment on sites where Active Directory is being used (managed networks)
    • The Network Administrator has to:
      • give temporary administrative privileges to the logged in user to install the add-in
      • log the User out after installation and revert security privileges to prior settings

    Pros:

    • COM Add-in works for all users on the same machine (provided they have run the installer).

    Cons:

    • Installation for each user is cumbersome for network administration.
    • Updates mean that the add-in has to be reinstalled for every user of the add-in.
    • "Run As" installations do not work - user has to be logged on with administrative privileges as the required registry keys do not get created for the Current User.

    Regards, Matthew

    Filed under: ,
    • Post Points: 53
  • Fri, Aug 22 2008 3:36 AM In reply to

    • Nick Hodge
    • Top 10 Contributor
    • Joined on Sun, Dec 23 2007
    • Southampton
    • Posts 541
    • Points 9,270
    • MVP

    Re: VSTO Add-in Installation - Multiple Users

    Matthew

    Thanks for stopping by with that. To give it as much visibility as possible I will post a link on my blog to.

    Useful stuff Yes

    Thanks

    Regards
    Nick Hodge
    Microsoft MVP, Excel
    Southampton, UK

    Filed under: , ,
    • Post Points: 21
  • Tue, Jun 9 2009 11:37 AM In reply to

    • tapiwach
    • Not Ranked
    • Joined on Tue, Jun 9 2009
    • Posts 1
    • Points 5

    Re: VSTO Add-in Installation - Multiple Users

    Hi I am new and I foudn the VSTO add-in Installation quite interesting. For some reason I am not seeing the link with the solution.

    thanks

     

    • Post Points: 5
  • Fri, Oct 9 2009 12:09 PM In reply to

    • farzad
    • Not Ranked
    • Joined on Fri, Oct 9 2009
    • Posts 1
    • Points 21

    Re: VSTO Add-in Installation - Multiple Users

    You done a great job here,

    I just wonder you may have a solution for me , my situation is :

    VSTO 3 ( 2008)

    windows server 2008  ( terminal server + citrix environment)

    VS 2008 sp1

    Excel 2007

    * I want to install  as admin then it will be available for all users on same machine.

    • Post Points: 21
  • Sat, Oct 10 2009 2:27 AM In reply to

    • Mattheq
    • Top 25 Contributor
    • Joined on Wed, Apr 23 2008
    • Perth, Australia
    • Posts 37
    • Points 568

    Re: VSTO Add-in Installation - Multiple Users

    Farzad,

    I haven't had an experience with this in a Terminal Server environment.

    What I have noted in VS2008 developing for Excel 2007 is that the installation is much the same as VS2005 for Excel 2003 where you have to grant the users Admin privileges to the system to install.

    I am yet to come across a solution to allow 'normal' users to install and update the add-in on eithe VS2005 or VS2008.  Sorry I can't be of much help here. 

    Regards, Matthew

    • Post Points: 5
  • Tue, Mar 9 2010 1:03 AM In reply to

    Re: VSTO Add-in Installation - Multiple Users

    Just saw this on the Microsoft VSTO blog, which looks like an update on this topic:

    http://blogs.msdn.com/vsto/archive/2010/03/08/deploying-your-vsto-add-ins-to-all-users-saurabh-bhatia.aspx

    Mathias

    • Post Points: 5
Page 1 of 1 (6 items) | RSS
Copyright Excel User Group and the relevant contributors, 2009. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.