Visual Studio Development Bookmark and Share   
 index > Visual Studio Tools for Office > Deploying a VS2008 VSTO3 add-in for all users
 

Deploying a VS2008 VSTO3 add-in for all users

Hi - I am well aware that this topic has been discussed plenty... I've spent hours reading posts that discuss deployment and I confess that I'm at least as confused as when I started. I have built a Word 2007add-in using VS2008. I need to deploy it to all users, not just the current user. Does there exist a step by step guide for what I need to do to accomplish this?

Thank you!
Steve Schlipf  Wednesday, September 23, 2009 4:20 PM
Welcome to PAIN!!!!

This is a hot topic as I have been telling the product team for many years about this. VSTO doesn't support HKCurrent User or should I say the Office 2007 doesn't when using VSTO.

BUT THERE IS SOME WORKAROUNDS!!!!

Misha from the the Product Team has blogged a useful feature the office team use for replicating current Local Machine Settings to the Current User at the Load of an Office Application, this is well documented here http://blogs.msdn.com/mshneer/archive/2008/04/24/deploying-your-vsto-add-in-to-all-users-part-iii.aspxand there a number of parts but this works and I use this policy today. I am hopefull this will change in the future... "PLEASE FIX AND ALLOW ALL USER!"

Regards
Mike Walker MVP - Visual Developer VSTO - Please mark the best replies as Answers !
Mike Walker  Wednesday, September 23, 2009 5:32 PM
Welcome to PAIN!!!!

This is a hot topic as I have been telling the product team for many years about this. VSTO doesn't support HKCurrent User or should I say the Office 2007 doesn't when using VSTO.

BUT THERE IS SOME WORKAROUNDS!!!!

Misha from the the Product Team has blogged a useful feature the office team use for replicating current Local Machine Settings to the Current User at the Load of an Office Application, this is well documented here http://blogs.msdn.com/mshneer/archive/2008/04/24/deploying-your-vsto-add-in-to-all-users-part-iii.aspxand there a number of parts but this works and I use this policy today. I am hopefull this will change in the future... "PLEASE FIX AND ALLOW ALL USER!"

Regards
Mike Walker MVP - Visual Developer VSTO - Please mark the best replies as Answers !
Mike Walker  Wednesday, September 23, 2009 5:32 PM
Yes I've seen Misha's postings and it is indeed the most authoritative thing I've seen at this point. The reason that I havent taken it and run with it is that Misha's three related posts point at multiple other documents which in tern point at multiple documents, some related to VS2008 / VSTO3 and others VS2005 / VSTO2. I honestly can't understand what it is I'm supposed to do, or just what I'll have when I'm done. "Pain" puts it very mildly. How am I supposed to explain to may client that it takes longer to create a way to deploy something than it took to build it in the first place? Or do I just eat that time? This is ridiculous!
Steve Schlipf  Wednesday, September 23, 2009 10:00 PM

Hello Steve,

Welcome to MSDN forums!

I think you are looking for a complete step by step guide of Deploy VSTO 3.0Solution to ALL Users, please refer to this link:
http://vba2vsto.blogspot.com/2009/03/deploying-vsto-30-solution-for-2007.html

I believe this article meets your requirement, however, it misse
s a small piece of the pazzle: How to set the increasement of the key Count in
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\User Settings\MyAddInName] hive.

To complete
the whole process, please follow below steps to set above registry value correctly

1. We need to a newblankproject(named it RegisterModify in this post) in your solution

2. Then add a InstallerClass in this project

3. Implement the code in Misha's second article, it's in the RegisterOffice2007AddIn part:
http://blogs.msdn.com/mshneer/archive/2007/09/05/deploying-your-vsto-add-in-to-all-users-part-ii.aspx

4. Override the corresponding method in the InstallerClass such as :

public override void Install(System.Collections.IDictionary stateSaver)
public override void Uninstall(System.Collections.IDictionary savedState)

5. Next Add RegisterModify project to the output of your Setup Project.

6. Right-ClickSetup Project, select View-Custom Actions, add RegisterModify project in each behavior like Install,UnInstall.

7. Right-Click RegisterModify under Install/UnInstall folder, and select properties. Last fill the Custom Action Data field to complete the whole process.


Hope this helps you.

Thanks.

Tim Li

MSDN Subscriber Support in Forum

If you have any feedback on our support, please contact msdnmg@microsoft.com


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Tim Li  Thursday, September 24, 2009 7:27 AM
Hi Tim

This was certainly helpful. But I've put more days into trying to implement it and I'm not there yet...

When I try to load the add-in I'm getting "runtime error occurred during the loading of the com add-in". I've commented out everything my add-in tries to do, so I think I haven't implemented these instructions correctly yet.

What should the overrides of Install and Uninstall in the RegisterAddIn and UnRegisterAddIn in Misha's post? should the base.Install and base.Uninstall run?

What else would be causing this error?

Thank you!
Steve Schlipf  Sunday, October 18, 2009 3:03 AM

You can use google to search for other answers

Custom Search

More Threads

• Custom "PublishToSharePoint" Add-In: How to get the right Dialogs after SaveAs?
• retrive live changing data(stock data) from excel cell.
• Problems with Excel Template and sheet names
• Error 0x80040F04 while Accessing Outlook using VSTO 2005
• Excel 2003 doc-level customization with Excel 2007
• Excel within an MDI application
• Handling ComException
• VSTO on various platforms?
• I cannot find a well documented API of VSTO
• Set default signature in Outlook with Outlook Addin