Re: Register add-in to HKLM automatically

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

From: Ken Slovak - [MVP - Outlook] (kenslovak_at_mvps.org)
Date: 06/10/04

  • Next message: RJ Lohan: "COM Addin For Word - Manipulating CommandBars"
    Date: Thu, 10 Jun 2004 16:36:47 -0400
    
    

    As a side note, always make sure an addin isn't registered in both HKLM and
    HKCU. Weird things happen when it's registered in both.

    -- 
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
    Reminder Manager, Extended Reminders, Attachment Options
    http://www.slovaktech.com/products.htm
    "Stephen Bullen" <stephen@bmsltd.ie> wrote in message
    news:VA.000001dc.019eee63@bmsltd.ie...
    > 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
    >
    >
    

  • Next message: RJ Lohan: "COM Addin For Word - Manipulating CommandBars"

    Relevant Pages

    • 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 ... chose Addin for the new project ...
      (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 ... chose Addin for the new project ...
      (microsoft.public.outlook.program_addins)
    • 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 ... chose Addin for the new project ...
      (microsoft.public.office.developer.outlook.vba)
    • Re: IE menu extension
      ... And it also doesn't work in HKLM if you use a unique ... CLSID to name the subkey? ... DLL is registered. ... you could just make a little program to write the Registry ...
      (microsoft.public.vb.general.discussion)
    • Re: Windows Service - Event Log
      ... writing to the registry (HKLM). ... that I am too) are talking about creating an Event Log, ... Administrators group on the local machine, or the local System account. ...
      (microsoft.public.dotnet.languages.csharp)