Package a Deployable COM Component
Register Add-Ins and COM Components
COM components are used in both MATLAB® Compiler™ and MATLAB Compiler SDK™, therefore some of the instructions relating to building and packaging COM components and add-ins can be shared between products.
When you create your COM component, it is registered in either
based on your log-in privileges.
If you find you need to change your run-time permissions due to security standards imposed by Microsoft® or your installation, you can do one of the following before deploying your COM component or add-in:
Log on as
administratorbefore running your COM component or add-in
Run the following
mwregsvrcommand prior to running your COM component or add-in, as follows:where:
mwregsvr [/u] [/s] [/useronly] project_name.dll
/uallows any user to unregister a COM component or add-in for this server
/sruns this command silently, generating no messages. This is helpful for use in silent installations.
/useronlyallows only the currently logged-in user to run the COM component or add-in on this server
If your COM component is registered in the
it will not be visible to Windows Vista® or Windows® 7 users
administrator on systems with UAC (User
Access Control) enabled.
If you register a component to the
under Windows 7 or Windows Vista, your COM component may fail
to load when running with elevated (
If this occurs, do the following to re-register the component
LOCAL MACHINE hive:
Unregister the component with this command:
mwregsvr /u /useronly my_dll.dll
Reregister the component to the
LOCAL MACHINEhive with this command: