1. Create a certificate file:
Makecert / SV "Sample_ATX.PVK" / N "CN = Soft Information Security Lab" Sample_atx.cer
Here, sample_atx.pvk represents the newly created private key saved file name
"China Soft Information Security Lab" is the company name you want to display
Sample_atx.cer is you create the final certificate file name
These are filled in according to your own requirements, and finally get two files of Sample_ATX.PVK and Sample_atx.cerr.
Among them, you need to enter a private key to protect your password during operation. Be sure to enter, don't go wrong.
2, the conversion CER format is SPC format (can be omitted): CERT2SPC Sample_atx.cer Sample_atx.spc
Get the sample_atx.spc file.
3. Create a sample_atx.inf file: as follows: [Version]
Signature = "$ chicago $"
Advancedinf = 2.0
[Add.code]
Sample_atx.ocx = sample_atx.ocx
MSVCRT.DLL = MSVCRT.DLL
Mfc42.dll = mfc42.dll
OLEPRO32.DLL = OLEPRO32.DLL
[CERT_ATX.OCX]
FILE-WIN32-X86 = thiscab
CLSID = {75486221-8862-400C-9A34-3D6B449ABFF2}
Fileversion = 1, 0, 0, 0
RegisterServer = YES
[msvcrt.dll]
Fileversion = 4, 20, 0, 6164
Hook = mfc42installer
[mfc42.dll]
Fileversion = 4, 2, 0, 6256
Hook = mfc42installer
[olepro32.dll]
Fileversion = 4, 2, 0, 6068
Hook = mfc42installer
[mfc42installer]
File-win32-x86 = http://activex.microsoft.com/controls/vc/mfc42.cab
Run =% extract_dir% / mfc42.exe
This INF specifies sample_atx.ocx that requires the installed version. "thiscab" is a keyword means that the CAB file containing the INF. Other DLL files are the dynamic connection libraries you want to use when this sample_atx.ocx is published, you can also download the required DLL files from the Internet, as long as you specify an HTTP URL, you can, for example,: file -win32-x86 = http: //activex.microsoft.com/controls/vc/mfc42.cab, keyword "file-win32-x86" specified platform is x86.
The process of getting a version number of a file is: Right-click this file in Windows NT or Windows 95 Explorer; select Properties from the pop-up list, then select the version tag in the dialog that will then pop up. Sometimes you may need to insert an additional 0 in the file version. For example, the version number of the ATL.DLL is displayed in the dialog box is 2.00.7024, which becomes 2,00, 0,7024 in the INF file.
"CLSID" refers to the CLSID to install the control.
4, then use the command cabarc n sample_atx.cab sample_atx.inf sample_atx.ocx, package sample_atx.ocx and sample_atx.inf to sample_atx.cab5, check if you use Chktrust to check correct Chktrust -V Sample_atx.cab
6. Use the SignCode to sign the CAB file signature, use "Custom" when selecting the signature type, select the certificate when selecting a certificate.
7. Copy the signed CAB file and the corresponding HTM file to the address of the proxy server