Xceed Zip Compression Library Documentation
Macros for the self-extractor module
Self-Extractor Module reference > Macros for the self-extractor module

Some properties that are used by the Self-Extractor Module allow macros to be used when specifying paths and file names. The macros available are listed in each (self-extractor module) property's description. The ZipPreprocessingFile event also allows the use of macros to be used in order to change the path and filename of each file stored in the self-extracting zip file, so you can manually control where each file will be extracted to.

A macro is a substring of two characters that has the format %x. The x is a letter representing one of the available macros (see below). The two characters representing the macro are replaced by a path only when the actual self-extracting Zip file is executed. Thus, the value of a macro usually depends on the particular settings of the Windows operating system the self-extracting Zip file is being run on.

All macros except for the %r macro include the drive as part of the path. The %v macro only contains the drive letter followed by the colon (:) character. None of the macros contain a trailing backslash.

Macros used by SfxStrings and SfxMessages properties are special macros that apply only to those properties. Only the macros common to multiple properties are listed below.

Here is a list of the common macros:

Macro Description
%w The location of the Windows folder.
%s The location of the Windows System folder.
%t The systems temporary folder.
%r Random folder name that doesn't already exist. (the format of the random name is: _SFXxxx, where xxx is a random number)
%d The unzipping folder, or the user-selected folder where files were unzipped to.
%e The folder where the self-extractor is being run from.
%p The Program Files folder (only available in Windows 95 and NT 4.x and up).
%v The main system hard disk.

All macros except for the %r macro include the drive letter. The %v macro only contains the drive letter followed by the colon (:) character. None of the macros contain a trailing backslash.