Expand Command-Line Options

Expand.exe expands one or more compressed update files. When you view or extract the contents of a product update package (for example, a security patch, a critical update, or an update rollup), the files that are shown or extracted may not include all of the files that are actually updated by the package.

Windows use Intra-Package Delta (IPD) compression technology to reduce the size of packages. If you do not use a compression tool that supports IPD to extract the update, the extracted files will look similar to the following output:

_manifest_.cix.xml
0
1
2
…

This behavior occurs if both of the following conditions are true:

  • You did not use Expand.exe from the Windows Assessment and Deployment Kit (Windows ADK) to open the update.

  • The update uses Intra-Package Delta (IPD) compression technology.

Expand.exe supports expanding files in IPD-compressed updates for inspection. You must use the Expand.exe version released with the Windows ADK or the Windows Vista, Windows 7, and Windows 8 operating systems. Prior versions of Expand.exe do not support extracting IPD-compressed data.

Expand Command-Line Options

Expand.exe uses the following conventions.

expand <source> [<destination>] [-r] [–d] [–i] [-f:<files>] [/?]

Option Description

-r

Renames expanded files.

<destination>

Specifies where files are to be expanded. If source is multiple files and -r is not specified, destination must be a directory. destination can consist of a drive letter and colon, a directory name, a file name, or a combination of one or more of these.

-d

Displays a list of files in the source location. Does not expand or extract the files.

-f:<files>

Specifies the files in a cabinet (.cab) file that you intend to expand. You can use wildcard characters (* and ?).

-i

Ignores the directory structure in the .cab file and expands the content as flat files to the destination directory. This command is useful when the CAB file contains files in nested directories and you want to expand the content to a single directory.

<source>

Specifies the files to expand. source can consist of a drive letter and colon, a directory name, a file name, or a combination. You can use wildcard characters (* and ?).

/?

Displays help at a command prompt.

 

Using Expand at the Recovery Console

The Expand.exe command, with different parameters, is available from the Recovery Console. The Recovery Console is a command-line interface that provides a limited set of administrative commands for repairing a computer.

Examples

The following examples show how to use the Expand.exe tool:

expand -r C:\package.cab C:\Files
expand -d C:\package.cab -f:* 
expand C:\package.cab -f:compressed.inf C:\Files

Drvload Command-Line Options

Lpksetup Command-Line Options

Oscdimg Command-Line Options

Tzutil Command-Line Options

Winpeshl.ini Reference: Launching an app when WinPE starts

Wpeinit and Startnet.cmd: Using WinPE Startup Scripts

Wpeutil Command-Line Options

Bootsect Command-Line Options

BCDboot Command-Line Options