Welcome to Lockergnome.com!
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Office 2007, Vista, COM Add-in fails to load if UAC is tur..

 
   Home -> Office -> Program Add-Ins RSS
Next:  Program Add-Ins: Commandbar Button Click Handler  
Author Message
eselk

External


Since: Aug 08, 2007
Posts: 2



(Msg. 1) Posted: Wed Aug 08, 2007 12:17 pm
Post subject: Office 2007, Vista, COM Add-in fails to load if UAC is turned off
Archived from groups: microsoft>public>outlook>program_addins (more info?)

When I use the Add... button from the COM add-ins list to add my DLL,
I can see that Outlook loads the DLL and calls DllRegisterServer, and
everything suceeds as expected. However, Outlook then unloads my DLL
(which I think it normally does after registering it), but then it
never loads my DLL again (DllEntryPoint never called). My COM add-in
shows up in the list AND IS CHECKED, but is not actually loaded. If I
close the list and re-open, it is not checked anymore and Outlook says
it had a run-time error at startup. However, it never loaded my DLL
again. My DLL doesn't have any non-system dependencies so I don't
think it is a missing DLL issue (they are all located in system32).

Weird thing is, the same DLL works fine if I enable UAC. Same DLL
also works under other versions of Windows and Office. I know the
easy answer would be to just enable UAC, but that is beyond my control
since it isn't just an in-house project.

Outlook still doesn't require add-ins to be signed, right? I'm
thinking my add-in may not be registered correctly, maybe there are
some new settings as of Office 2007... although why would it work with
UAC enabled, if it was just that.
Back to top
Login to vote
eselk

External


Since: Aug 08, 2007
Posts: 2



(Msg. 2) Posted: Wed Aug 08, 2007 2:21 pm
Post subject: Re: Office 2007, Vista, COM Add-in fails to load if UAC is turned off [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Not using managed code, just C++, but this is exactly what I needed.
I didn't know that part at the end... I just figured it was best to
register under HKEY_CURRENT_USER (for the classes part), since Vista
put a big hex on anything HKEY_LOCAL_MACHINE. I don't like the idea
of registering under current_user if not running UAC, and
local_machine if running UAC, so I think I'll just always do
local_machine (which for me means I have to shell out to another EXE
to elevate, because my main install/setup isn't elevated, what fun).

On Aug 8, 12:33 pm, "Ken Slovak - [MVP - Outlook]"
<kenslo... DeleteThis @mvps.org> wrote:
>
> If this is managed code you might be running into the situation described inhttp://msdn2.microsoft.com/en-us/library/ms269007(vs.80).aspx#Office2....
> The relevant part might be this:
>
> Registry Entries for Microsoft Office 2003 Add-ins on Windows Vista
> If you are deploying a Microsoft Office 2003 add-in to a computer that is
> running Windows Vista, you must create several of the registry keys in a
> different registry subtree in the following scenarios:
>
> a.. The user is running the Microsoft Office 2003 application with a full
> administrator access token.
>
> - or -
>
> b.. The user has turned off User Account Control (UAC).
>
> In these scenarios, you must create the COM registration keys (that is, all
> of the keys that are defined under HKEY_CURRENT_USER\Software\Classes) under
> HKEY_LOCAL_MACHINE\Software\Classes instead. This is because Windows Vista
> looks for COM registration keys only under HKEY_LOCAL_MACHINE in these
> scenarios. For information about how to change the registry keys in the
> default Setup project, see Setup Projects for Application-Level Add-ins.
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Program Add-Ins All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 General
 Microsoft Windows XP
 Microsoft Windows Vista
 Microsoft Windows (other)
  Microsoft Office
 Microsoft Office (other)
 Computer Security
 Linux
 Movies


[ Contact us | Terms of Service/Privacy Policy ]