Error in Add-In

Add-in Express™ Support Service
That's what is more important than anything else

Error in Add-In
AddIn Express code fails 
Sergey Chizh




Posts: 73
Joined: 2012-10-23
After upgrading Windows 10 to the latest build, user gets this exception when opening an MS Office application (Word, Excel, Outlook). There is no logical pattern - it happens at random when MS Office is open

System.Exception: OpenKey failed. ---> System.Security.SecurityException: Adgang til den ønskede registreringsdatabase er ikke tilladt.
ved System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
ved Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
ved AddinExpress.Projects.Common.ADXRegistry.OpenKey(String name, Boolean writable)
Zonen for assemblyen, der mislykkedes, var:
MyComputer
--- Slut på staksporing af indre undtagelser ---
ved AddinExpress.Projects.Common.ADXRegistry.OpenKey(String name, Boolean writable)
ved AddinExpress.MSO.ADXAddinModule.AddinExpress.MSO.IDTExtensibility2.OnStartupComplete(Array& custom)

Incident only affects 1 user at customer. Affected user is NOT local admin on her PC


Here is the system information: https://www.screencast.com/t/Vv0sknsvE

https://www.screencast.com/t/kRp4iAiNx
Posted 09 Sep, 2019 02:54:57 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Sergey,

Do you mean that every session of using these Office applications starts with this exception? Or, she doesn't get this issue in some sessions?

I would check the Application log, the antivirus log, and talk to an admin. I would explain them that the add-in reads keys in HKCU or HKLM (see section "Locating COM Add-ins in the Registery" in the manual).


Andrei Smolin
Add-in Express Team Leader
Posted 09 Sep, 2019 04:59:56 Top
Sergey Chizh




Posts: 73
Joined: 2012-10-23
Hello, Andrei. It is OK that add-in express reads registry keys but it is not OK that it starts to throw exceptions after the latest windows update. And why those exceptions that happens at some independent from our code random moment are not hidden from the user?
Posted 09 Sep, 2019 05:13:45 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Sergey,

Hope you understand that your add-in works in environment which may change between sessions and this may influence your add-in.

Please respond to these requests:

1) I still do not understand if the exception occurs every time or not.
2) Please provide the adxregistrator.log describing how the add-in was registered on that machine
3) Also, please the adxregistrator.log describing how the add-in registers on your machine
4) Do you handle the OnError event on the add-in module?

On windows update. I don't think it relates.


Andrei Smolin
Add-in Express Team Leader
Posted 09 Sep, 2019 05:37:59 Top
Sergey Chizh




Posts: 73
Joined: 2012-10-23
Hello, Andrei
I received new information from our customer:
- Virus scan log does not show anything
- Only one user have this problem
They could not find the reg key to look at, nothing suspicious is found in addin express logs
Log files from user's PC: https://drive.google.com/file/d/1rNL2iY8vM_oL20x6jh1y9XPb2LcG9y7Q/view?usp=sharing
https://drive.google.com/file/d/11CK5snlXzpAc4vRF6RC0dyNoy-CrNBc8/view?usp=sharing
Posted 04 Oct, 2019 08:45:27 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Sergey,

Does the issue occur every time or sometimes only?


Andrei Smolin
Add-in Express Team Leader
Posted 04 Oct, 2019 08:55:48 Top
Sergey Chizh




Posts: 73
Joined: 2012-10-23
User says that she had worked with add-in for about 2 hours before the problem began to happen... after it started is was all the time.
Posted 07 Oct, 2019 08:00:02 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Sergey,

I suppose the user doesn't have permissions to write values under HKCU\Software\Microsoft\Office\{host application}\AddIns\{add-in ProgId; see this attribute in the code of the add-in module}. In that key, the add-in tries to change the ADXStartMode value from FIRSTSTART to NORMAL. Or, if ADXStartMode is absent, it tries to create it.

Another possibility is: the user doesn't have permissions to read values under HKCU\Software\Microsoft\Office\{Office version}.0\Common.


Andrei Smolin
Add-in Express Team Leader
Posted 07 Oct, 2019 10:22:39 Top
Sergey Chizh




Posts: 73
Joined: 2012-10-23
The permissions in REG database looks ok, but the ADXStartMode is missing:
https://drive.google.com/file/d/1g-zmKb_6BtihFSCmK43w2r1GDmoX0Byg/view?usp=sharing
https://drive.google.com/file/d/1T-fZQESEdsq9J2Y6axi_rZ0dYu7pURr8/view?usp=sharing

The problem is seen in Excel That is more or less the only program the user uses.
Posted 09 Oct, 2019 09:40:00 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Sergey,

Could you please provide the complete version string shown on the page File | Account | About Excel if you start Excel on that machine?


Andrei Smolin
Add-in Express Team Leader
Posted 10 Oct, 2019 03:56:50 Top