Xceed .NET Libraries Documentation
Welcome to Xceed Data Manipulation Compoents for .NET and .NET Standard / Basic Concepts / Zip and streaming capabilities / Self-extracting zip files
In This Topic
    Self-extracting zip files
    In This Topic

    The Xceed Zip Self-Extractor binary provides support for creating fully customizable 16- and 32-bit self-extracting zip files on Windows 32-bit systems. These self-extracting zip files allow a user to simply "run" the zip file to unzip its contents. The self-extracting zip files contain all the code necessary to unzip their contents, so no compression utilities, DLLs or other components are required on the user's machine in order to unzip the contents of the zip file.

    Because Xceed's self-extracting binary modules support Zip64, they can create self-extracting files larger than 2 GB. However, the Windows operating system usually has difficulty loading executables this large. It is therefore recommended to limit the size of self-extracting files to 2 GB.

    XceedSfxPrefix Class

    A self-extracting zip file is a zip file that has the necessary information in its prefix (header) to unzip the files it contains without the need for third party applications such as WinZip or even Xceed Zip for .NET. 

    The XceedSfxPrefix class is not available in Xceed Zip for Xamarin.

    With Xceed Zip for .NET, the Xceed self-extractor binary is represented by the XceedSfxPrefix class. All the properties of the self-extractor binary can be set via this class. It is up to you, in your instance of the XceedSfxPrefix class, to specify which Xceed Self-Extractor binary you want to use. When you installed Xceed Zip for .NET, the 32-bit and 16-bit versions of the Xceed Self-Extractor binary should have been installed in the <Installation Folder>\Xceed Components\Bin\Sfx folder. These binaries are as follows:

    SFX Module Description
    XCDSFX16.BIN For 16-bit self-extracting zip files that work on Windows 3.1 and up.
    XCDSFX32.BIN For 32-bit self-extracting zip files created with the Deflate method that work on Windows 95 and up.
    XCDSFXBZ.BIN For self-extracting zip files created with the BWT method.
    XcdSfxZ64BzAES.bin For 32-bit self-extracting zip files created with Deflate, Deflate64, BZip2, BWT, and LZMA compression methods and encrypted with AES, supporting Zip64 format extensions and extra headers.
    XcdSfxZ64AES.bin For 32-bit self-extracting zip files created with Deflate or Deflate64 compression methods and encrypted with AES, supporting Zip64 format extensions and extra headers.
    XcdSfxZ64.bin For 32-bit self-extracting zip files created with Deflate or Deflate64 compression methods, supporting Zip64 format extensions and extra headers.
    XcdSfxZ64LzmaAES.bin For 32-bit self-extracting zip files created with Deflate, Deflate64, or LZMA compression methods and encrypted with AES, supporting Zip64 format extensions and extra headers.
    XcdSfxZ64Lzma.bin For 32-bit self-extracting zip files created with Deflate, Deflate64, or LZMA compression methods, supporting Zip64 format extensions and extra headers.

    Although the main purpose of the zip prefix is to allow for self-extracting files to be created, it can also be used to store custom data. To do this, the SfxPrefix class is used rather than the XceedSfxPrefix class.

    Note for Windows Vista users

    In order for your self-extracting zip file to work properly under Windows Vista, one of the following SFX modules which have been compiled with the appropriate manifests must be used.

    SFX Module Description
    xcdsfx32_requireAdministrator.bin
    xcdsfxbz_requireAdministrator.bin
    XcdSfxZ64BzAES_requireAdministrator.bin
    XcdSfxZ64AES_requireAdministrator.bin
    XcdSfxZ64_requireAdministrator.bin
    XcdSfxZ64LzmaAES_requireAdministrator.bin
    XcdSfxZ64Lzma_requireAdministrator.bin
    Requires administrative privileges in order to run.
    xcdsfx32_highestAvailable.bin
    xcdsfxbz_highestAvailable.bin
    XcdSfxZ64BzAES_highestAvailable.bin
    XcdSfxZ64AES_highestAvailable.bin
    XcdSfxZ64_highestAvailable.bin
    XcdSfxZ64LzmaAES_highestAvailable.bin
    XcdSfxZ64Lzma_highestAvailable.bin
    Requires highest available privileges in order to run.
    xcdsfx32_asInvoker.bin
    xcdsfxbz_asInvoker.bin
    XcdSfxZ64BzAES_asInvoker.bin
    XcdSfxZ64AES_asInvoker.bin
    XcdSfxZ64_asInvoker.bin
    XcdSfxZ64LzmaAES_asInvoker.bin
    XcdSfxZ64Lzma_asInvoker.bin
    Requires invoker privileges in order to run.

    All the manifests used by the above SFX modules have their requestedExecution attribute level set to the corresponding value, and the UIAccess attribute set to false. Select the one which bests suits the target platforms.

    For more information can be found on the Understanding and Configuring User Account Control in Windows Vista web site.

    Getting Started