We have developed ActiveX controls before, and then we will release them.
First, create a windows installation project and add the main output of the ActiveX control to the project output. Then, modify the main output file of the ActiveX control and change its Register attribute to vsdrpCOM .:
Next, we will change the project properties to Web boot. Unfortunately, absolute paths must be used in the installation folder URL in the Web boot program settings, and relative paths cannot be used. This means that the path must be determined when the installation program is generated, which is not very convenient. In the example, I used localhost. In the release, I can change it to the actual domain name.
Now we generate the installer and copy the corresponding program to the correct directory (in this example, the ActiveX folder under the default website directory ). We can directly execute the Setup. Exe file to verify the correctness of the Installation File. It is successfully executed on my machine!
Now we have to change the helloworld.htm file again. The modified result is as follows:
<Body bgcolor = '#223344'>
<Object id = "helloworld"
Classid = "clsid: 9551B223-6188-4387-B293-C7D9D8173E 3A "Width =" 184 "Height =" 96 "codebase =" ActiveX/Setup. Exe"
>
</Object>
<Br>
<Input type = 'button 'onclick = 'helloworld. ShowMessage ("Hello World! ") 'Value = 'click'>
</Body>
Note: We have added the codebase attribute to the object block. This is the location of the developed download control. You can use the relative path. Don't be too busy. We still cannot request this page correctly because we haven't signed our controls yet. The signature can be in two ways: one is the sign-in when the installation program is generated, and the other is the signature using sn.exe. We recommend that you use the latter because more options are available. I am too lazy to write more. You can refer to the article "publishing ActiveX" on csdn. First, I will remind you to apply for an Advanced Certificate when applying for a certificate. Download source code: download this site from the blog site