Mark ActiveX control as a security script

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.