Hi Govert, I got some user report their add-in init failed due to no perm to access registry key

183 views
Skip to first unread message

Odin Xiong

unread,
May 17, 2018, 9:50:28 PM5/17/18
to Excel-DNA
By open the diagnostic logging, it found an error as below:

ExcelDna.Integration Error: 4 : The Ribbon/COM add-in helper required by add-in Morningstar Add-In (64 bit) could not be registered.

This may be due to restricted permissions on the user's HKCU\Software\Classes key. : UnauthorizedAccessException - Access to the registry key 'HKEY_CLASSES_ROOT\CLSID\{EB981F7E-A63E-512A-ABEE-D4C136B67BE5}\InProcServer32' is denied.


I have some questions for this:

1. does this is must need action to do?

2. if not, can we have some setting to skip? 

3. if Need, do we have the registry keys which need permission?


Also, I will try to check the code about it.

Now we using version is 0.33 ?


Thanks.

Govert van Drimmelen

unread,
May 18, 2018, 2:28:28 AM5/18/18
to exce...@googlegroups.com
That message looks confusing to me - it talks about both the machine part of the registry (HKEY_CLASSES_ROOT) and the user's part of the registry (HKCU).

To load the Ribbon support, Excel-DNA must at least be able to write to the user's part of the registry. It need not write to the machine part.

This is only for Ribbon and RTD (async functions) support. Normal UDF functions do not need to write to the registry at all.

I suggest you test with a newer version of Excel-DNA on the same machine (preferably the current beta version 0.35.3-beta3). At least the message should be a bit better.

-Govert





From: exce...@googlegroups.com [exce...@googlegroups.com] on behalf of Odin Xiong [szj...@gmail.com]
Sent: 18 May 2018 03:50 AM
To: Excel-DNA
Subject: [ExcelDna] Hi Govert, I got some user report their add-in init failed due to no perm to access registry key

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.

Odin Xiong

unread,
May 21, 2018, 9:56:12 PM5/21/18
to Excel-DNA
Thanks, I so far, I can't reproduce this case. But i can try to upgrade the exceldna.

在 2018年5月18日星期五 UTC+8下午2:28:28,Govert van Drimmelen写道:
-Govert




To post to this group, send email to exc...@googlegroups.com.

Odin Xiong

unread,
Jun 4, 2018, 6:37:04 AM6/4/18
to Excel-DNA
Hi Gavert,
   User response the log, detail append at bottom.
1. user test the CanWriteMachineHive is true..
2. user start to write to MachineHive, seems success. But it begin to Deregister() ProgIdRegistration, and delete key failed.

Here I'm a little confused,  the test process some kind of same for CanWriteMachineHive & the process in  ProgIdRegistration.

Why it trigger Deregister(), and why delete failed?

current we used version are: 0.34.6 

Any suggestion for this?

Thanks.




-----------------------Log from user---------------------------

ExcelDna.Integration Verbose: 4 : Loading Ribbon/COM Add-In

ExcelDna.Integration Verbose: 4 : RegistrationUtil.CanWriteMachineHive - returning True

ExcelDna.Integration Verbose: 4 : RegistrationUtil.ClassesRootKey - Using HKLM\Software\Classes

ExcelDna.Integration Verbose: 4 : ProgIdRegistration - Set Value - HKEY_LOCAL_MACHINE\Software\Classes

ExcelDna.Integration Verbose: 4 : ProgIdRegistration - Set Value - HKEY_LOCAL_MACHINE\Software\Classes\Dna.eb981f7ea63e512aabeed4c136b67be5.0 -> {EB981F7E-A63E-512A-ABEE-D4C136B67BE5}

ExcelDna.Integration Verbose: 4 : RegistrationUtil.SetValue(HKEY_LOCAL_MACHINE\Software\Classes\Dna.eb981f7ea63e512aabeed4c136b67be5.0\CLSID, , {EB981F7E-A63E-512A-ABEE-D4C136B67BE5}, String)

ExcelDna.Integration Verbose: 4 : ProgIdRegistration - Delete SubKey Dna.eb981f7ea63e512aabeed4c136b67be5.0

ExcelDna.Integration Verbose: 4 : RegistrationUtil.DeleteSubKeyTree(HKEY_LOCAL_MACHINE\Software\Classes, Dna.eb981f7ea63e512aabeed4c136b67be5.0)

ExcelDna.Integration Error: 4 : The Ribbon/COM Add-In helper required by add-in Morningstar Add-In (64 bit) could not be registered.

This may be due to restricted permissions on the HKCU\Software\Classes key : UnauthorizedAccessException - Access to the registry key 'HKEY_LOCAL_MACHINE\Software\Classes\CLSID' is denied.

ExcelDna.Integration Verbose: 1 : Exit Integration.DnaLibraryAutoOpen

ExcelDna.Integration Verbose: 1 : In XlAddIn.XlAutoClose


Thanks.

Govert van Drimmelen

unread,
Jun 4, 2018, 7:29:33 AM6/4/18
to exce...@googlegroups.com

Excel-DNA tries to clean up changes that it makes to the registry, that’s why it is trying to delete.

I don’t know why it would fail.

Is it true that you can write to the HKEY_LOCAL_MACHINE\Software\Classes, but you cannot delete from it?

I’m sure Excel-DNA does not expect the permissions to be configured that way. It would be better if the user cannot write to that key, then Excel-DNA will try to write to the HKEY_CURRENT_USER instead.

 

Sometimes there is other security software installed on a machine that interferes with the registry access.

 

-Govert

--

You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.

To post to this group, send email to exce...@googlegroups.com.

Odin Xiong

unread,
Jun 5, 2018, 11:35:18 PM6/5/18
to Excel-DNA
yes. the point is, TryWriteMachine is OK... they have do write/delete on that too. but when really do the work, it failed... :( 

在 2018年6月4日星期一 UTC+8下午7:29:33,Govert van Drimmelen写道:
Reply all
Reply to author
Forward
0 new messages