Run the makecab command to decompress the file that comes with window.

Source: Internet
Author: User

Makecab is a file provided by Microsoft to create a cab. For details about makecab, refer to Microsoft msdn. The system provides the command usage as follows:


Microsoft (r) cabinet maker-version (32) 1.0020.601 (03/18/97)
Copyright (c) Microsoft Corp 1993-1997. All rights reserved.

Makecab [/V [N] [/d Var = value...] [/L dir] source [destination]
Makecab [/V [N] [/d Var = value...]/F directive_file [...]

Source file to compress.
Destination File name to give compressed file. If omitted,
Last character of the source file name is replaced
With an underscore (_) and used as the destination.
/F directives a file with makecab directives (may be repeated ).
/D Var = value defines variable with specified value.
/L dir location to place destination (default is current directory ).
/V [N] verbosity level (1... 3 ).

If the directory contains multiple files, you need to compile a file list file to tell makecab how many files need to be packaged.
Simply compile a list.txt file, which contains only two lines. One is libactivex. inf and the other is libactivex. dll.
Then execute:

Makecab/F list.txt/d compressiontype = LZX/d compressionmemory = 21/V

The system displays the compression process and results as follows:

Microsoft (r) cabinet maker-version 5.1.2600.2180
Copyright (c) Microsoft Corporation. All rights reserved ..

287,395 bytes in 2 files
Total files: 2
Bytes before: 287,395
Bytes after: 162,170
After/before: 56.43% Compression
Time: 0.74 seconds (0 HR 0 min 0.74 Sec)
Throughput: 378.76 KB/second

After compression, a directory is generated under the directory, and the file in the directory is changed to libactivex. Cab (which can be the file name you need.

Then you can put it in the directory of the Web server. When IE is opened, it will prompt you to download it.

Appendix: the INF generation method will be described later.

In fact, there are two ways to generate a cab file, one is to use Visual Studio, the other is to use a dedicated packaging tool, You can Google it.

Makecab usage and tips:

The simplest usage:
Complete makecab file name, such as makecab WMD. dll

Specify the compression type and memory size:
Makecab/d compressiontype = LZX/d compressionmemory = 21 WMD. dll high compression ratio

Batch compression:
For % v in (*. *) Do makecab % v

I have studied it for a long time and I don't know how to use a command to compress all the files in a directory into a cab package. Now I know how to compress the files into a cab package:
Makecab/F list.txt/d compressiontype = mszip/d compressionmemory = 21/D maxdisksize = 1024000000/d diskdirectorytemplate = dd */d cabinetnametemplate = dd *. Cab

To achieve a high compression ratio:
Makecab/F list.txt/d compressiontype = LZX/d compressionmemory = 21/D maxdisksize = 1024000000/d diskdirectorytemplate = dd */d cabinetnametemplate = dd *. Cab

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.