Create a cab

Source: Internet
Author: User
1. Create a certificate file:
Makecert/SV "sample_atx.pvk"/N "cn = chinesoft information security lab" sample_atx.cer
Sample_atx.pvk indicates the name of the newly created private key.
"Chinsoft information security lab" is the name of the company you want to display
Sample_atx.cer is the last Certificate file name you have created
Enter these files according to your requirements, and finally get the sample_atx.pvk and sample_atx.cer files.
During the operation, you must enter the password of the private key. Make sure that the password is consistent and do not make any mistakes.
2. Convert the CER format to the SPC format (which can be omitted ):
Cert2spc sample_atx.cer sample_atx.spc
Obtain the sample_atx.spc file.
3. Create the sample_atx.inf file in the following format:
[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
Registerserver = Yes
[Msvcrt. dll]
Fileversion =
Hook = mfc42installer
[Mfc42.dll]
Fileversion =
Hook = mfc42installer
[Olepro32.dll]
Fileversion =
Hook = mfc42installer
[Mfc42installer]
File-win32-x86 = http://activex.microsoft.com/controls/vc/mfc42.cab
Run = % extract_dir %/mfc42.exe
This INF specifies the version sample_atx.ocx to be installed. "Thiscab" is a keyword that indicates the cab file containing the INF. Other DLL files are the dynamic Connection Library Used for the release of sample_atx.ocx. You can also download the required DLL files from the Internet by specifying an http url, absolute or relative paths are acceptable, for example: file-win32-x86 = http://activex.microsoft.com/controls/vc/mfc42.cab, the keyword "file-win32-x86" specifies that the platform is x86.
To obtain the version number of a file, right-click the file in Windows NT or Windows 95 explorer, select Properties from the pop-up list, and then select the version label in the pop-up dialog box. Sometimes, you may need to insert an additional 0 in the file version. For example, the dialog box shows that the ATL. dll version is 2.00.7024, And the INF file is changed to 2, 00.
"CLSID" indicates the CLSID of the control to be installed.
4. Run the following command:Cabarc n sample_atx.cab sample_atx.inf sample_atx.ocx, package sample_atx.ocx and sample_atx.inf to sample_atx.cab
5. Check whether chktrust is correct
Chktrust-V sample_atx.cab
6. Use signcode to sign the cab file as required by the wizardUse "Custom" when selecting the signature type and "select from file" when selecting the certificate ".
7. Copy the signed cab file and corresponding HTM file to the proxy server address.

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.