RE: COM Addin dll and HKEY_LOCAL_MACHINE
- From: "Timo Jaakkimainen" <TimoJaakkimainen@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 26 Apr 2005 05:46:06 -0700
My continued research helped me solve the issue overall (with special thanks
to a posting I read by Tom Winter on "Using Visual Studio Installer, create
an Outlook component that can only be installed by an administrator but, once
installed, runs for all users".
The choices I have in designer for "Application" drop-down all reference
HKEY_CURRENT_USER (HKCU). Tom's solution was to add new entries to the
registry for HKEY_LOCAL_MACHINE (HKLM). When I did this, I was able to
associate the designer objects with HKLM and compile the DLL so that it would
register to HKLM. Here is the code I used:
- - - - - - - - - - -
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\AddIn Designer\Microsoft
Outlook (All Users On Local Machine)]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\AddIn Designer\Microsoft
Outlook (All Users On Local Machine)\Microsoft Outlook 9.0]
@="HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Office\\Outlook"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\AddIn Designer\Microsoft
Outlook (All Users On Local Machine)\Microsoft Outlook 9.0\LoadBehaviors]
"Load on demand"=dword:00000009
"Startup"=dword:00000003
"None"=dword:00000000
"Load at next startup only"=dword:00000010
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\AddIn Designer\Microsoft
Word (All Users On Local Machine)]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\AddIn Designer\Microsoft
Word (All Users On Local Machine)\Microsoft Word 9.0]
@="HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Office\\Word"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\AddIn Designer\Microsoft
Word (All Users On Local Machine)\Microsoft Word 9.0\LoadBehaviors]
"Startup"=dword:00000003
"Load on demand"=dword:00000009
"None"=dword:00000000
"Load at next startup only"=dword:00000010
- - - - - - - - - - -
All the best,
Timo
"Timo Jaakkimainen" wrote:
> Our project has a COM Add-in dll that adds buttons onto the Outlook toolbar
> (in-house added functionality). Wherever the DLL is installed, we want all
> users to have access to it.
>
> When you perform a 'make' in Visual Studio, it seems to always build the
> designer to register in HKEY_CURRENT_USER (HKCU). This is okay, except that
> only Power Users and Administrators can register DLLs (using regsvr32.exe),
> normal users can't. So, the answer is to have the DLL register to
> HKEY_LOCAL_MACHINE (HKLM). However, even if I go into the designer object
> (.dsr file) via a text editor and manual change the RegLocation to HKLM,
> Visual Studio's make function to automatically set it back to HKCU.
>
> However, I've discovered that if I go to a command line and run the "vb6
> /makedll" command, it will compile the DLL with HKLM values.
>
> I can't find any documentation or discussion regarding this. I was
> wondering, has anyone else has experienced this? Or, has anyone another
> suggestion besides this quirky fix of mine to get HKLM registration of my DLL?
>
> Timo
>
.
- References:
- COM Addin dll and HKEY_LOCAL_MACHINE
- From: Timo Jaakkimainen
- COM Addin dll and HKEY_LOCAL_MACHINE
- Prev by Date: Re: setting file encoding to utf-8
- Next by Date: Re: Help Needed on ActiveX EXE winsock worker
- Previous by thread: Re: COM Addin dll and HKEY_LOCAL_MACHINE
- Next by thread: Help Needed on ActiveX EXE winsock worker
- Index(es):