A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Office 2007, Vista, COM Add-in fails to load if UAC is turned off



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 8th 07, 09:17 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 9
Default Office 2007, Vista, COM Add-in fails to load if UAC is turned off

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.

Ads
  #2  
Old August 8th 07, 09:33 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Office 2007, Vista, COM Add-in fails to load if UAC is turned off

Not enough information.

Managed code or non-managed code? VSTO or shimmed shared addin if managed
code?

Where is the addin being registered, HKCU or HKLM?

If this is managed code you might be running into the situation described in
http://msdn2.microsoft.com/en-us/lib...ffice2003Vista.
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.

Note
Do not move the registry keys that are under
HKEY_CURRENT_USER\Software\Microsoft in these scenarios.



--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


wrote in message
ups.com...
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.


  #3  
Old August 8th 07, 11:21 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 9
Default Office 2007, Vista, COM Add-in fails to load if UAC is turned off

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]"
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.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Program in Office 2007 Upgrade will not load Bart Coyle Outlook - Installation 8 May 11th 07 08:28 PM
Outlook didn't load with office 2007 trial version Buster Outlook - Installation 2 March 12th 07 02:01 PM
how do I load Office 2007 onto Dell axim 30 which is running 2003 John Hospital Outlook - Installation 1 February 15th 07 11:03 PM
Another Problem getting Outlook 2007 to load in Office Pro 2007 Tr sbnetwork Outlook - Installation 7 February 3rd 07 08:31 PM
I want to load holiday updates past 2007 for office 2003 EFiore Outlook - Calandaring 1 September 3rd 06 08:12 PM


All times are GMT +1. The time now is 09:14 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.