The CAB File Extraction Tool may enter an infinite loop when you try to extract a file that is larger than 2 GB (836160)
The information in this article applies to:
- Cabinet Software Development Kit (CAB SDK)
SYMPTOMSWhen you use the CAB File Extraction Tool (Extract.exe) of
the Microsoft Cabinet Software Development Kit (CAB SDK) to try to extract a
file that is larger than 2 gigabytes (GB) from a CAB file, the CAB File Extraction Tool may enter an
infinite loop.CAUSECAB files have an internal limit on the size of included
files. This internal limit is approximately 2 GB. However, the CAB SDK does not enforce this internal limit. Therefore, you can use the CAB SDK to create a
CAB file that contains a file that is larger than 2 GB.
This behavior occurs when you try to
extract a file that is larger than 2 GB from a CAB file because the CAB File Extraction Tool cannot extract a file that is larger than the 2 GB internal limit.WORKAROUNDTo work around this behavior, split the file that is larger
than 2 GB into smaller files, and then include these files in a
multi-CAB set. To do this by using the CAB SDK, follow these steps:
- Create a directive file (.ddf) in the folder that contains
the file that is larger than 2 GB. To do this, use a text editor such as Notepad to
create a text file that is named MyDirectiveFile.ddf that contains the following text:
.Set CabinetNameTemplate=Test*.cab ; Test1.cab, Test2.cab, and so on.
.Set MaxDiskSize=1.44M
.Set Cabinet=on
.Set Compress=on
C:\Test\Test.txt ; The path of the file that is larger than 2 GB
.Set DestinationDir=C:\Test - Add the folder that contains the CAB File Extraction Tool and the Advanced
CAB File Creation Tool (Makecab.exe) to the path environment variable. To do this, run the following command at
a command prompt:
set
path=%path%;FolderPath Note FolderPath is a placeholder for the
path of the folder that contains the Extract.exe file and the Makecab.exe file. - At a command prompt, switch to the folder that contains
the Test.txt file.
- Use the Advanced
CAB File Creation Tool to create a multi-CAB set for the Test1.txt
file. To do this, run the following command at a command
prompt:
Makecab /F
MyDirectiveFile.ddf Folders that are named disk1, disk2, and so on
are created in your current folder. Each folder contains a CAB file. - Use the CAB File Extraction Tool to extract the Test.txt file. To do this,
run the following command at the command prompt:
Extract /A
disk1\Test1.cab /L Test1 Test.txt After some time, you
receive the following message in the command prompt window: Extracting Test1\Test.txt Extract needs cabinet file
'Test2.cab' from 'Disk 2'. Please enter the path where this file may
be found, and press ENTER: - Type the path of the disk2 folder, and then press ENTER.
After some time, you receive a message that is similar to the message that you
received in step 5.
This new message prompts you to provide the
path of the next CAB file that is part of the multi-CAB set. - Type the path of the next CAB file in the multi-CAB set, and then press ENTER.
After some time, you receive a message that is similar to the message that you received in step 6. - Repeat step 7 until you have extracted all the CAB files in the multi-CAB set.
STATUS This
behavior is by design.REFERENCES
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
168941
INFO: Frequently asked questions about CAB files
310618 Microsoft Cabinet Software Development Kit
Modification Type: | Major | Last Reviewed: | 3/17/2004 |
---|
Keywords: | kbSDK kbMiscTools kbfile kbCAB kbprb KB836160 kbAudDeveloper |
---|
|