Re: Register add-in to HKLM automatically

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Stephen Bullen (stephen_at_bmsltd.ie)
Date: 06/10/04


Date: Thu, 10 Jun 2004 18:10:10 GMT

Hi JvF,

> I have built an add-in using VB6 for outlook. When I build the DLL it
> places the registry entries automatically into HKCU as I expect. What
> I want is to have the registry entries (all of them) go to HKLM
> instead when I make the DLL (this is important as I plan to send this
> out as an install and I want them to run it and forget it - not have
> to change the registry manually). I can add almost all to HKLM myself
> using the Advanced Tab of the AddInDesigner but the DLL fails to load
> when I put LoadBehavior there.

It works for me. Here's what I did:

 1. Started VB6, chose Addin for the new project
 2. Removed the default form, cleared out the Connect class
 3. Added the OnConnection event, with a simple MsgBox
 4. Switched to the Designer form
 5. Selected Microsoft Outlook in the Application
 6. Set Initial Load Behavir to None
 7. Switch to the Advanced tab and made the dialog wider <g>.
 8. Put the following into the 'Registry Key' field:
 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins\MyAddIn.Connect
 
 9. Clicked 'New Value', String value, FriendlyName, My Test
 10. Clicked 'New Value', DWORD value, LoadBehavior, 3
 11. Noticed the 3 appeared in quotes, clicked 'Edit Value' and OK. The 3 was no longer in quotes
 12. Compiled the dll
 13. Started Outlook
 14. Got the message
 15. Popped up the COM Addins dialog, which was empty (as it should be).

 

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.ie



Relevant Pages

  • Re: Register add-in to HKLM automatically
    ... > places the registry entries automatically into HKCU as I expect. ... > I want is to have the registry entries go to HKLM ... > instead when I make the DLL (this is important as I plan to send this ... Selected Microsoft Outlook in the Application ...
    (microsoft.public.outlook.program_addins)
  • Re: Register add-in to HKLM automatically
    ... > places the registry entries automatically into HKCU as I expect. ... > I want is to have the registry entries go to HKLM ... > instead when I make the DLL (this is important as I plan to send this ... Selected Microsoft Outlook in the Application ...
    (microsoft.public.office.developer.outlook.vba)
  • Re: Register add-in to HKLM automatically
    ... > places the registry entries automatically into HKCU as I expect. ... > I want is to have the registry entries go to HKLM ... > instead when I make the DLL (this is important as I plan to send this ... Selected Microsoft Outlook in the Application ...
    (microsoft.public.office.developer.com.add_ins)
  • Re: Register add-in to HKLM automatically
    ... When I build the DLL it ... > places the registry entries automatically into HKCU as I expect. ... > I want is to have the registry entries go to HKLM ...
    (microsoft.public.vb.com)
  • Re: Register add-in to HKLM automatically
    ... When I build the DLL it ... > places the registry entries automatically into HKCU as I expect. ... > I want is to have the registry entries go to HKLM ...
    (microsoft.public.office.developer.com.add_ins)