Discussion:
Word add-in - install "everyone" vs "just me"
(too old to reply)
David Thielen
2004-09-19 23:52:26 UTC
Permalink
Hello;

Sorry for the wide distribution but I am stuck on these 4 items and
have googled and searched msdn and microsoft.com - all to no avail.

This is for a Word add-in written in C# and using the
IDTExtensibility2 approach (ie not VSTO).

When I created my add-in, I selected the check box install for
everyone. The setup program Visual Studio then created gives the user
the option to install the add-in for "everyone" or for "just me." And
this is how I want it to work - that the user can decide if the add-in
is for everyone or just them.

When I run the install, if I select "just me" it installs fine and
runs fine.

If I select "everyone" it installs fine but when I run Word it is not
there (even if I reboot after installing). I then go to COM Add-ins...
and explicitly select the COM shim dll and add it - and after that the
dialog still lists no add-ins. So it silently refuses to add it.

A developer inthe Word group told me "the setup registers the add-in
per-machine (which partly explains the problem in (1) below) but the
code assumes you’re registered per-user, so your add-in Connect
constructor fails and throws an uncaught exception."

So clearly there is a problem here. But what I have not been able to
find anywhere is:

1) How does the code assume your are registered per user vs. per
machine?

2) How do I set up the code to be able to be registered per user or
per machine (as different users will want this each way).

3) Is there anything else I need to do in setup to make this work
right? I am worried as I am using the setup Visual Studio created and
it allows the option on install - which apparently is wrong.

thanks - dave
David Thielen
2004-09-20 00:55:20 UTC
Permalink
Hi;

There is some more about this at
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q316723 but
the only thing new it seems to say is a Word add-in should be in the
GAC. But the way I read it is this is only for the case where a COM
shim is not used.

I'd also prefer to not put my add-in in the GAC as it will never be
called by anything else.

??? - thanks - dave
Post by David Thielen
Hello;
Sorry for the wide distribution but I am stuck on these 4 items and
have googled and searched msdn and microsoft.com - all to no avail.
This is for a Word add-in written in C# and using the
IDTExtensibility2 approach (ie not VSTO).
When I created my add-in, I selected the check box install for
everyone. The setup program Visual Studio then created gives the user
the option to install the add-in for "everyone" or for "just me." And
this is how I want it to work - that the user can decide if the add-in
is for everyone or just them.
When I run the install, if I select "just me" it installs fine and
runs fine.
If I select "everyone" it installs fine but when I run Word it is not
there (even if I reboot after installing). I then go to COM Add-ins...
and explicitly select the COM shim dll and add it - and after that the
dialog still lists no add-ins. So it silently refuses to add it.
A developer inthe Word group told me "the setup registers the add-in
per-machine (which partly explains the problem in (1) below) but the
code assumes you’re registered per-user, so your add-in Connect
constructor fails and throws an uncaught exception."
So clearly there is a problem here. But what I have not been able to
1) How does the code assume your are registered per user vs. per
machine?
2) How do I set up the code to be able to be registered per user or
per machine (as different users will want this each way).
3) Is there anything else I need to do in setup to make this work
right? I am worried as I am using the setup Visual Studio created and
it allows the option on install - which apparently is wrong.
thanks - dave
Mike Walker
2004-10-18 23:08:54 UTC
Permalink
Hi David,

Com Addin's register as COM Components but also register in the registry for
Office to be able to initialise the components the location of this registry
is what is likely to be at fault ;

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Word\Addins\comshimdll.Connect
would be used for Machine registration
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Word\Addins\comshimdll.Connect
would be used for User registration

both are presuming the COMClass is comshimdll.Connect is also registered,
some com addin shim samples are written to register to the User registry
only and hence only work on the registration of the DLL in this position.
Another area which will be what u have expierienced is that the ComAddins
section in the Office application will not list when it is registered in the
Local Machine registry key area.

I hope this points u in the right direction.

Mike Walker
MVP Visual Developer VSTO
(Please Reply via NG)
Post by David Thielen
Hi;
There is some more about this at
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q316723 but
the only thing new it seems to say is a Word add-in should be in the
GAC. But the way I read it is this is only for the case where a COM
shim is not used.
I'd also prefer to not put my add-in in the GAC as it will never be
called by anything else.
??? - thanks - dave
Post by David Thielen
Hello;
Sorry for the wide distribution but I am stuck on these 4 items and
have googled and searched msdn and microsoft.com - all to no avail.
This is for a Word add-in written in C# and using the
IDTExtensibility2 approach (ie not VSTO).
When I created my add-in, I selected the check box install for
everyone. The setup program Visual Studio then created gives the user
the option to install the add-in for "everyone" or for "just me." And
this is how I want it to work - that the user can decide if the add-in
is for everyone or just them.
When I run the install, if I select "just me" it installs fine and
runs fine.
If I select "everyone" it installs fine but when I run Word it is not
there (even if I reboot after installing). I then go to COM Add-ins...
and explicitly select the COM shim dll and add it - and after that the
dialog still lists no add-ins. So it silently refuses to add it.
A developer inthe Word group told me "the setup registers the add-in
per-machine (which partly explains the problem in (1) below) but the
code assumes you're registered per-user, so your add-in Connect
constructor fails and throws an uncaught exception."
So clearly there is a problem here. But what I have not been able to
1) How does the code assume your are registered per user vs. per
machine?
2) How do I set up the code to be able to be registered per user or
per machine (as different users will want this each way).
3) Is there anything else I need to do in setup to make this work
right? I am worried as I am using the setup Visual Studio created and
it allows the option on install - which apparently is wrong.
thanks - dave
Loading...