locked
Load behaviour values in HKCU and HKLM RRS feed

  • Question

  • Hi,

    I am working on a addin in Microsoft word. To install this addin I am using install.bat file with LOADBEHAVIOUR parameter. but on changing the LOADBEHAVIOUR value , am not getting proper results as per the following link.

    https://msdn.microsoft.com/en-us/library/bb386106.aspx

    According to the link, HKCU will overwrite HKLM, but in my case sometimes it is reading value from HKLM , sometimes from HKCU. for example- I kept LOADBEHAVIOUR=2 while installing and the added addin manually from word options, then HKCU got changed to 3 but when I reopened the word it did not load the addin on start up.
    why this strange behavior?

    Tuesday, August 25, 2015 10:30 AM

Answers

  • Hi James,

    Is the account administrator(build-in account)? As far as I tested, if the account is administrator(build-in account), the Word application would always read/modify the registry entry from HKEY_LOCAL_MACHINE.

    And if the account is created by ourself, the Word application would change the registry entry from HKEY_CURRENT_USER. However if the LOADBEHAVIOUR under HKEY_LOCAL_MACHINE is 2 then the add-in wouldn't be load automacilly.

    Here is an list to help you understand:

    AccountType

    HKEY_LOCAL_MACHINE

    HKEY_CURRENT_USER

    Load automatically

    None build-in account

    3

    3

    Yes

    None build-in account

    3

    2

    No

    None build-in account

    2

    3

    No

    None build-in account

    2

    2

    No

    Build-in   account(Administrator)

    3

    None

    Yes

    Build-in   account(Administrator)

    2

    None

    No

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 28, 2015 7:35 AM

All replies

  • Hello James,

    Is your add-in loaded if you remove the HKLM key from the windows registry?

    Tuesday, August 25, 2015 2:36 PM
  • Hi Eugene,

    HKLM Registry entries are required for the add-in to load.

    Wednesday, August 26, 2015 4:17 AM
  • Hi James,

    As far as I tested, the add-in would try to load the add-in when the LOADBEHAVIOUR=3 as the article metioned.

    Please ensure the LOADBEHAVIOUR is 3(it it is 2, the add-in maybe load failed) after you start the Word application.

    If the issue still exited, would you mind sharing us the Office version and bit you were using? And where is the full path of LOADBEHAVIOUR?

    Also here is a helpful article for troubleshoot VSTO add-in not loading:
    My Office Addin does not Load!

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, August 26, 2015 5:52 AM
  • Hi Fei,

    I am using Microsoft office 2010.

    Windows 8, 64 bit OS

    the add-in will load if I will keep LOADBEHAVIUOR=3 in HKLM. but my question is why it is not taking LOADBEHAVIOUR value from HKCU.
    AS HKCU will override HKLM values, so if LOADBEHAVIOUR=2 in HKLM and is 3 in HKCU, then it should load the add-in. but it is not loading, which means it is reading value from HKLM.

    registry paths-

    HKCU= [HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins\My®Draft]

    HKLM= [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Word\Addins\My®Draft]

    Thanks.

    Wednesday, August 26, 2015 6:13 AM
  • Hi James,

    Thanks for the detail information for this issue.

    Are you using 64-bit Office? If I understood correct, the correct registry entry should be like below:
    HKEY_CURRENT_USER \Software\Wow6432Node\Microsoft\Office\application name\Addins\add-in ID

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, August 27, 2015 2:38 AM
  • Hi Fei,

    I tried with HKEY_CURRENT_USER \Software\Wow6432Node\Microsoft\Office\application name\Addins\add-in ID registry entry. but still it is reading from only HKLM.

    Thursday, August 27, 2015 10:11 AM
  • Hi James,

    Is the account administrator(build-in account)? As far as I tested, if the account is administrator(build-in account), the Word application would always read/modify the registry entry from HKEY_LOCAL_MACHINE.

    And if the account is created by ourself, the Word application would change the registry entry from HKEY_CURRENT_USER. However if the LOADBEHAVIOUR under HKEY_LOCAL_MACHINE is 2 then the add-in wouldn't be load automacilly.

    Here is an list to help you understand:

    AccountType

    HKEY_LOCAL_MACHINE

    HKEY_CURRENT_USER

    Load automatically

    None build-in account

    3

    3

    Yes

    None build-in account

    3

    2

    No

    None build-in account

    2

    3

    No

    None build-in account

    2

    2

    No

    Build-in   account(Administrator)

    3

    None

    Yes

    Build-in   account(Administrator)

    2

    None

    No

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 28, 2015 7:35 AM