VSTO Word 2003 Addin for All User

Add-in Express™ Support Service
That's what is more important than anything else

VSTO Word 2003 Addin for All User
 
edward




Posts: 2
Joined: 2010-05-06
Hi,

I tried to make a word 2003-addin using the VSTO loader-isolation option.
I am intended to make the addin can be installed for all user.
The addin must contain a menu bar, toolbar, and a takspane.
VSTO or ADX loader does not matter as long as these requirements are fulfilled.

I will start my story from creating the addin through the wizard :)

I unchecked the "configure installer for standar user", so the addin will be installed on the ProgFiles folder.

Quoted from the manual:
Check the "Configure the setup project for the Standard User" checkbox, for your add-in to be installed by a non-admin user the checkbox disables the "Everyone / Just Me" choice in the installer UI and targets the DefaultLocation property of the setup project to [AppDataFolder] instead of [ProgramFilesFolder].


I started adding some toolbars/buttons to my addin, here are the details:
1. A menu bar, which contains a button
2. A toolbar, which contains a button
3. A panel (TaskPane) which contains a button
All buttons have a OnClick event that will show a MessageBox

I set the RegisterForAllUsers to True in the AddinModule.
I also set the InstallForAllUser to True for the Project primary output in the Setup file.
The "Register" property for the Project primary output is set to vsdrpCOMRelativePath (based on my previous experience developing word addin with VSTO).

I build the installer and then install it on a clean machine through the msi file by selecting the Everyone option.

The add-in is installed for all user successfully, but there are some problems:
1. The standard user (non admin) has the new menu bar, but no button on it. The button on the panel and toolbar are shown and works ok.
2. After I uninstall the addin, the standar user still has the registry key on their HKCU.
3. After uninstallation, I still have the menu and toolbar sitting there and doing nothing on the standard user (the taskpane dissapear though).

What did I do wrong?
I can also send the code and project files if it will be helpful.
Thanks in advance.

Edward
Posted 06 May, 2010 04:25:53 Top
Andrei Smolin


Add-in Express team


Posts: 17361
Joined: 2006-05-11
Hi Edward,

We always recommend using the Add-in Express loader. Moreover, Add-in Express 2010 doesn't support the VSTO Loader option.

When you customize the command bar UI of Word, it saves all custom things to normal.dot; when a user starts Word and your add-in is installed, Add-in Express adds your command bars etc to the Word UI, then Word saves the command bars to normal.dot. Note that normal.dot is a per-user thing. That is, if you install a per-machine add-in that customizes the command bar UI of Word, all customizations will be saved to normal.dot files of every user on the PC. Accordingly, when you uninstall such an add-in, the only normal.dot accessible is the normal.dot of the current user and all other normal.dot files will keep your command bars until the user removes them manually (see View | Customize in the main menu). Hope you understand why HKCUs of those users still mention your add-in. A workaround is to install your add-in on the per-user basis.

As to the first issue, can you please send me your AddinModule.cs (AddinModule.vb) to the support e-mail address? Please make sure your e-mail contains a link to this topic.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 06 May, 2010 08:01:44 Top
Edward Ferdian




Posts: 2
Joined: 2010-05-06
Hi Andrei,

Thanks for the reply. I have also sent the AddinModule.cs to the support email address.
I am using Add-in Express 2009, which does support VSTO loader I believe :)

But what is the difference / advantage on using adx-loader instead of vsto-loader?

I tried to create the same project using the adx loader option in the past few hours.
By using the adx-loader, the first problem is solved, all the buttons appear normally and the onClick events are successfully fired.

Problem no 2 and 3 still exist, like you explained.
Is there no workaround to remove it from the HKCUs of all user?
Or maybe is there a way to make it work by adding the key only to HKCM without adding them to HKCU?

Thank you

Edward
Posted 06 May, 2010 09:04:13 Top
Andrei Smolin


Add-in Express team


Posts: 17361
Joined: 2006-05-11
Hi Edward,

Thank you for sending me your add-in module. To change the location of adxCommandBarPopup1 among other popups on the main menu, you need to specify any of the properties below:
- BeforeID
- After ID
- Before

Edward Ferdian writes:
Is there no workaround to remove it from the HKCUs of all user?


No way, unfortunately.

Edward Ferdian writes:
Or maybe is there a way to make it work by adding the key only to HKCM without adding them to HKCU?


This is impossible, too.

Edward Ferdian writes:
But what is the difference / advantage on using adx-loader instead of vsto-loader?


Please see Deploying Add-in Express projects.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 07 May, 2010 06:11:40 Top