Mark ActiveX control as a security script?
This problem is actually caused by the first problem. After ActiveX control is developed and registered, once it runs on a webpage, ie does not think this is a script safe, an IE prompt is displayed, indicating that the site has been blocked from using ActiveX controls in an insecure manner. Therefore, this page may be incorrect.
If we do not solve this problem, our previous work would be white-handed. What should we do? You need to modify the client registry,
Add an item similar to the following (replaced by the control class ID){06889605-b8d0-101a-91f1-00608cead5b3}
) To associate your keys with the following class IDs:
Hkey_classes_root \ CLSID \ {audience} \ implemented categories \ {audience}
But how can I modify the registry of the client machine? This requires the installation of ActiveX controls. Therefore, we need to create an ActiveX InstallationProgramHere we use Visual Studio 2005 to create the installation program.
1. Open Vs and create an installation project.
2. In the Solution Explorer window, right-click Project> Add File> select your generated ativex file, such as hello. ocx.
3. Right-click the project and choose View> registry.
1> Add the Registry in sequence according to the above registry Node
2> in the last section of the Registry, right-click> Properties window> set alwayscreate to true, which indicates that this registry entry is a branch of the installation project, even if it is empty. After this setting, the client registry is automatically modified during installation.
4. Generate the installer
5. Run the installer
6. Browse the page containing the ActiveX
You will find that the prompt is gone, and you do not need to add a trusted site in IE to use it directly! Is it really refreshing?
So far, the introduction is similar. There are several questions that need to be studied:
1. Do not create an installation package. Can this problem be solved?
2. How to store data in acivex, for example, a user name. After the first input, remember it for the second time.
If you are interested, you can discuss with me or give me some advice. Thank you!