Microsoft

Tech Tip: Use the Extract utility more effectively

Some procedures require you to extract replacement system files from the original Windows media. Windows 9x comes with the necessary tool to complete this task. You can use Extract.exe to remove and decompress files from the Windows .cab files to your disk or a floppy.

One of the biggest problems with .cab files is trying to find out which .cab file contains the file you need to extract. But you don't necessarily need to know which .cab file to check. If you use the /a switch, you can specify the file to start looking in, and Extract.exe will then search each sequentially named .cab file from there.

For example, the following line will start looking in Win95_02.cab for Unidrv.dll and then move on to Win95_03.cab, Win95_04.cab, Win95_05.cab, and so on, until it finds it. It will then extract the file to C:\Windows\system as specified with the /l switch.

extract /a d:\win95\win95_02.cab unidrv.dll /l c:\windows\system

You should find Extract.exe in \Windows\command.

List the contents of .cab files

You can also use Extract.exe to list the contents of .cab files using another of its command-line switches. The following command will write to the screen the contents of the D:\win95\win95_02.cab file.

extract /d d:\win95\win95_02.cab

If necessary, you could use the command lines below to create a text file containing the list of files in each of the Windows media .cab files (where d:\win95 is the location of the .cab files).

extract /a /d d:\win95\mini.cab >c:\wincabs.txt
extract /a /d d:\win95\precopy1.cab >>c:\wincabs.txt
extract /a /d d:\win95\win95_02.cab >>c:\wincabs.txt

It can be quicker searching for the name of a file in this text file to determine the correct .cab file and then using Extract.exe on that file than it is using the /a switch to search through all the .cab files when the file is in the last one.

Editor's Picks

Free Newsletters, In your Inbox