___                   ____            ___                  _
_/ /______ ________ / /_ ___ _ __/ _/______ __ _ ___\\/_ ___
_) _ /___\_ // _// /_____. \_ // /_____. (_ ____\ \
\ \ / / / \ _/ | / / _/ | / ___/___
/_________\ / /________\ \ |________\ \ |_____\ \ /
- -
diP---_ __ ___\------_ ____\_____|------_ ____\_____|----_ ___________\-
\___\  NEWS - RELEASES - TOOLS - ARTICLES - MEMBERS - LINKS

Cab Dropping - The new Generation of 4kb intro packing
by SpaceCommander / ByTeGeiZ


Last Changes: 05.12.2003


Introduction


This article explains how to pack a 4kb intro as self extracting and running cab file.

Needed tools

  • Microsoft Cabinet Software Development Kit   Download
  • Simple hexeditor   Download
Packing the intro


Unpack the Microsoft Cabinet Software Development Kit and copy the file Cabsdk\BIN\Cabarc.exe to the folder including your intro. Rename the executable file of your intro to x.exe and call cabarc.exe from Microsoft Cabinet Software Development Kit to pack your intro:


    cabarc -m LZX:15 n x.cab x.exe

    Microsoft (R) Cabinet Tool - Version 1.00.0601 (03/18/97)
    Copyright (c) Microsoft Corp 1996-1997. All rights reserved.

    Creating new cabinet 'x.cab' with compression 'LZX:15':
    -- adding x.exe

    Completed successfully


Now we created a cab file including our packed intro. The size of this archive should be always smaller than the size packed with one of the win32 exec packers around.


Creating a intro runner


Create a new file called start.bat and insert the following lines:


    extract x.cab
    extrac32 x.cab
    x
    pause
    del x.exe


The first line will work on Windows 95, ME systems, the second on Windows 98, NT, 2000, XP. If you don't need one of these, just delete the line. Open the file start.bat in a hexeditor an remove all 0d bytes to gain some bytes in this batch file.


Making the cab file selfrunning


If you don't like the start.bat you can also make the cab file selfrunning. Copy the file x.cab to x.bat, so the operating system will know that our packed cab file is an executable batch file. Open the file x.bat in your hexeditor, go to end of file and insert the bytes 0d 0a 0a. Now insert the commands you need to extract, for example "extrac32 %0" followed by a 0a byte. Now add a "x" to start the extracted file.

Contact

SpaceCommander(at)ByTeGeiZ.de