The following describes how to load ActiveX controls on a webpage:
<HTML>
<HR> <center> <P>
<OBJECT
Classid = "clsid: 0FC05E08-32EA-4A5A-A8F0-514D7927C3C6"
CodeBase = "pmc. cab # version = 0,308"
Width = 794
Height = 575
Align = center
Hspace = 0
Vspace = 0
>
</OBJECT>
</HTML>
There are two ways to enable automatic download of webpages:
1. Minimize the security of IE on the client.
2. Add a signature to the control.
The first method is feasible, but not practical. Therefore, you can sign the control.
The second method is as follows:
The following software (Microsoft) must be included ):
Makecert.exe creates a certificate in cer format, that is, an X.509 Certificate. You can also create a private key.
Cert2spc.exe converts a cer certificate to a spc certificate, that is, a PKCS #7 certificate.
Signcode.exe sign the certificate to ocx
Chktrust.exe check whether ocx after signing the certificate is correct
Then:
1. Create a certificate file:
Makecert-sv "My. PVK"-n "CN = My" my. cer
Here, my. PVK indicates the name of the newly created private key.
My is the name of the company you want to display
My. cer is the last Certificate file name you have created
2. Convert the cer format to the spc format (which can be omitted)
Cert2spc my. cer my. spc get the dream. spc file.
3. Sign ocx
Run signcode, which is implemented through the interface.
4. Check whether chktrust is correct.
Chktrust-v myProj. ocx