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
running your COM component or add-in
Run the following
prior to running your COM component or add-in, as follows:
mwregsvr [/u] [/s] [/useronly] project_name.dll
/u allows any user to unregister
a COM component or add-in for this server
/s runs this command silently,
generating no messages. This is helpful for use in silent installations.
/useronly allows 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 MACHINE hive
with this command: