MATLAB: Do I get an 0x80070005 error when I try to register the add-in component built from MATLAB Builder EX

0x80070005accessadd-incomcomponenterrorexcelMATLAB Builder EXregisterviolation

I'm trying to register my Excel Add-in component, built from MATLAB Builder EX 2.2 (R2012a), on the target deployment machine. But I get a 0x80070005 error.
My registration workflow is to open the DOS command window, navigate to the compiled add-in and use the command
regsvr32 myaddin.dll

Best Answer

This is a Microsoft access violation related error. Please try running the DOS command window as a system administrator (right click and then hit 'Run as Administrator'), and then registering again.
If the above does not work, try restarting Windows in safe mode, run the DOS command window in administrator and try registering again. If this succeeds, you should be able to start Windows back up in normal mode and utilize the add-in.