Article ID: 836160 - Last Review: March 17, 2004 - Revision: 1.0
The CAB File Extraction Tool may enter an infinite loop when you try to extract a file that is larger than 2 GB
On This Page
SYMPTOMS
When 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.
CAUSE
CAB 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.
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.
WORKAROUND
To 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%;FolderPathNote 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.ddfFolders 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.txtAfter some time, you receive the following message in the command prompt window:
- 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.
MORE INFORMATION
Steps to reproduce the behavior
- Create a folder in the root folder of drive C on your computer. Name the folder Test.
- In the Test folder, create a text file that is larger than 2 GB. Name the file Test.txt.
- Use the Advanced
CAB File Creation Tool to create a CAB file for the Test.txt file.
To do this, follow these steps:
- At a command prompt, switch to the C:\Test folder.
- Run the following command to create a CAB file for the
Test.txt file:Makecab Test.txt TestCAB.cab
- Use the CAB File Extraction Tool to try to extract the Test.txt file from
the TestCAB.cab CAB file. To do this, follow these steps:
- At a command prompt, run the following
command:Extract TestCAB.cab Test.txtYou receive the following message in the command prompt window:
- Type the path of the folder that contains the TestCAB.cab CAB file, and then press ENTER. You receive the following message: If you provide the path again, you receive this message again. This behavior is an infinite loop.
- At a command prompt, run the following
command:
REFERENCES
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
168941
(http://support.microsoft.com/kb/168941/
)
INFO: Frequently asked questions about CAB files
310618
(http://support.microsoft.com/kb/310618/
)
Microsoft Cabinet Software Development Kit
Note: This article is from Microsoft Knowledage Base
Related problems posted by other users | |
| more... |


