Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   User Account Control and Add-in install (http://www.outlookbanter.com/add-ins-outlook/31749-user-account-control-add-install.html)

Slava Barouline November 2nd 06 02:31 AM

User Account Control and Add-in install
 
Hi

I am trying to install Addin for Outlook 2007 Beta 2 under Windows Vista RC2
using regsvr32.

I get an exception
[Window Title]
RegSvr32

[Content]
The module "TRSOutlookAddin.dll" was loaded but the call to
DllRegisterServer failed with error code 0x80004005.

For more information about this problem, search online using the error code
as a search term.

[OK]

To register Addin I need to open Outlook and do it via Tools -
Options -....- COM Addins

If I turn off UAC, regsvr32 works fine.

What is the right way to install Outlook Addin in Windows Vista?

Thanks




Dmitry Streblechenko November 2nd 06 06:00 PM

User Account Control and Add-in install
 
Did you try to debug your dll by specifying regsvr32.exe as the host app?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Slava Barouline" slavadotbarouline@recruitmentsystemsdotcomdotau wrote in
message ...
Hi

I am trying to install Addin for Outlook 2007 Beta 2 under Windows Vista
RC2
using regsvr32.

I get an exception
[Window Title]
RegSvr32

[Content]
The module "TRSOutlookAddin.dll" was loaded but the call to
DllRegisterServer failed with error code 0x80004005.

For more information about this problem, search online using the error
code as a search term.

[OK]

To register Addin I need to open Outlook and do it via Tools -
Options -....- COM Addins

If I turn off UAC, regsvr32 works fine.

What is the right way to install Outlook Addin in Windows Vista?

Thanks






Slava Barouline November 2nd 06 11:10 PM

User Account Control and Add-in install
 
Unfortunately my development PC is Windows XP not Windows Vista

I still beleive it's permissions restrictions in Windows Vista due to UAC



Dmitry Streblechenko November 3rd 06 12:17 AM

User Account Control and Add-in install
 
Might very well be if your dll tries to install itself into HKLM or HKCR.
You need to implement your own version of DllRegisterServer that uses
RegOverridePredefKey to redirect the registry output ot HKCU before the
default implementation of DllRegisterServer is called.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Slava Barouline" slavadotbarouline@recruitmentsystemsdotcomdotau wrote in
message ...
Unfortunately my development PC is Windows XP not Windows Vista

I still beleive it's permissions restrictions in Windows Vista due to UAC




Slava Barouline November 3rd 06 05:19 AM

User Account Control and Add-in install
 
As a COM library it creates entries in HKLM

When I install ANY Outlook Add-in, Outlook registers Add-in in AddIns key:

HKEY_CURRENT_USER\Software\Microsoft\Office\Outloo k\AddIns\

If this is what causes my problem, every Add-in will have the same problem

Am I right?


"Dmitry Streblechenko" wrote in message
...
Might very well be if your dll tries to install itself into HKLM or HKCR.
You need to implement your own version of DllRegisterServer that uses
RegOverridePredefKey to redirect the registry output ot HKCU before the
default implementation of DllRegisterServer is called.




Dmitry Streblechenko November 3rd 06 05:40 PM

User Account Control and Add-in install
 
Not at all - all of my add-ins are smart enought to installs themselves in
HKCU if HKLM is inaccessible :-)

If you want to register a COM object on a per-user basis, create registry
entries in
HKEY_CURRENT_USER\Software\Classes
instead of HKEY_CLASSES_ROOT

Note that when you look at HKEY_CLASSES_ROOT, Windows merges the real
HKEY_CLASSES_ROOT hive (common for all users) with the per-user entries from
HKEY_CURRENT_USER\Software\Classes.
Even if you use a function that explicitly tries to create entries in
HKEY_CLASSES_ROOT (such the the stock implementation of DllRegisterServer),
RegOverridePredefKey will allow you to redirect the calls to any registry
key of your choice for the current process completely transparently. After
you are done, you can restore the old key by calling RegOverridePredefKey
again.

Also note that most installers nowadays do not call DllRegisterServer for
the COM libraries by default (you need to expicilty tell them to do
otherwise), but simply create (what they think are) the appropriate registry
keys directly wirhout ever loading the dll during the install.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Slava Barouline" slavadotbarouline@recruitmentsystemsdotcomdotau wrote in
message ...
As a COM library it creates entries in HKLM

When I install ANY Outlook Add-in, Outlook registers Add-in in AddIns key:

HKEY_CURRENT_USER\Software\Microsoft\Office\Outloo k\AddIns\

If this is what causes my problem, every Add-in will have the same problem

Am I right?


"Dmitry Streblechenko" wrote in message
...
Might very well be if your dll tries to install itself into HKLM or HKCR.
You need to implement your own version of DllRegisterServer that uses
RegOverridePredefKey to redirect the registry output ot HKCU before the
default implementation of DllRegisterServer is called.







All times are GMT +1. The time now is 05:13 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-2006 OutlookBanter.com