If you want to create an ActiveX control which is marked as “safe for scripting” to be used in Internet Explorer, you need your control to implement the IObjectSafety interface.
Luckily I found this blog describing a default implementation of IObjectSafety
For a step-by-step description on how to create an ActiveX with IObjectSafety and correspondig installer project (.msi) including screenshots, see this blog.
That said, apart from the requirement that the developer needs to implement this interface, nothing is going to prevent that the ActiveX does real harm once installed.
Worse, the ActiveX is instantiated to be queried whether it is a “good” control, opening the door for malicious code.
See the security discussion in this mail list archive.