&nbsp;
<h3>Introduction</h3>
If you are in need of a self-extracting executable, check out Window's built-in compression tool, iexpress.exe, before investing money on a third-party solution like WinZip. Using Windows native compression format, Cabinet (or CAB for short), the compressed files are more like mini-installation programs with the compressor including support for license files, prompt windows, and the launch of other applications when extraction is finished. Configuration and creation of an executable is an easy step-by-step process handled via the IExpress Wizard. At the end of the wizard, the option to save your configuration as a Self Extraction Directive file (or SED for short) is available.  These SED files can be loaded at the start of the wizard or supplied as arguments in the Windows command line, negating the need to complete the wizard twice for the same file. The command line support also makes iexpress.exe perfect for automated tasks via batch files or in custom software.

While iexpress is a great and convenient tool, there is also a few downsides one should be aware of before using it as a solution. For example, a default folder to extract to cannot be defined for the executable and must always be entered in manually before extracting. Also, an executable created with the 64-bit version of the application cannot be decompressed on 32 bit architecture.
<p style="text-align: center"><a href="http://egroup.jasonmangone.com/wp-content/uploads/2011/11/iexpress_1.png"><img class="aligncenter" src="http://egroup.jasonmangone.com/wp-content/uploads/2011/11/iexpress_1-300x212.png" alt="" width="300" height="212" /></a></p>

<h3>Tutorial</h3>
For a quick tutorial, we will run through the process of using the wizard to create our first executable, saving our chosen configuration as an SED file, and creating a batch file that make uses of this SED configuration to automatically generate all future executables...

1. Run <strong>iexpress.exe</strong> from the command line. NOTE: This defaults to the 64-bit version on 64 bit Windows. To use the 32 bit, you have to directly run the iexpress.exe file in SystemWOW64.
2. Choose <strong>Create new Self Extraction Directive file</strong>.
3. Choose the <strong>Package purpose</strong> you wish to create. Information about each package type can be found in the description window.
4. Enter the <strong>Package title</strong>.
5. If you want the user to be prompted with a message at the start of the extraction process, choose <strong>Prompt user with: </strong>and then type in the message you wish to be displayed
6. If you have a license file to display, choose <strong>Display a license: </strong>and then click Browse to select the license file.
7. Click <strong>Add </strong>and select the files you wish to be compressed into the package.
8. If you choose <strong>Extract files and run an installation command </strong>during <strong>Package purpose, </strong>you will now be prompted to choose an executable to run or enter a Windows command to execute when the executable is done extracting it's files.
9. Leave <strong>Default </strong>selected for <strong>Show window</strong>
10. If you wish for a message to be displayed when the executable is done extracting, click <strong>Display message </strong>and type in your message.
11. Enter a full path and file name for the executable.
12. Make sure <strong>Save Self Extraction Directive (SED) file </strong>is selected. Choose a folder to store the SED file.
13. Clicking <strong>Next </strong>one more time will create your first executable and then save the SED file.
14. Open Notepad.
15. Type the following: <strong>iexpress /N c:/pathTo/SEDFile.SED </strong>using your own path for your SED file. The /N argument will skip the wizard and force the iexpress to create the executable from the SED.
16. Save the file as iexpress_test.batch.
17. Double click the file to create a new executable. You will notice the previous one, if it has not been removed from it's folder, will automatically be overwritten.
<p style="text-align: center"><a href="http://egroup.jasonmangone.com/wp-content/uploads/2011/11/iexpress_2.png"><img class="aligncenter" src="http://egroup.jasonmangone.com/wp-content/uploads/2011/11/iexpress_2-300x213.png" alt="" width="300" height="213" /></a></p>

<h3>External Resources</h3>
Command line switches for the executable: <a title="Command Line Switches for the Executables" href="http://support.microsoft.com/kb/197147" target="_blank">http://support.microsoft.com/kb/197147</a>
<h3>Example SED File</h3>
[Version]
Class=IEXPRESS
SEDVersion=3
[Options]
PackagePurpose=InstallApp
ShowInstallProgramWindow=0
HideExtractAnimation=1
UseLongFileName=0
InsideCompressed=0
CAB_FixedSize=0
CAB_ResvCodeSigning=0
RebootMode=N
InstallPrompt=%InstallPrompt%
DisplayLicense=%DisplayLicense%
FinishMessage=%FinishMessage%
TargetName=%TargetName%
FriendlyName=%FriendlyName%
AppLaunched=%AppLaunched%
PostInstallCmd=%PostInstallCmd%
AdminQuietInstCmd=%AdminQuietInstCmd%
UserQuietInstCmd=%UserQuietInstCmd%
SourceFiles=SourceFiles
[Strings]
InstallPrompt=
DisplayLicense=
FinishMessage=
TargetName=X:\kix410registry.exe
FriendlyName=KiXtart 4.10 installation with file associations
AppLaunched=kix32.exe
PostInstallCmd=kix32.exe install.kix
AdminQuietInstCmd=
UserQuietInstCmd=
FILE0="install.kix"
FILE1="start1.kix"
FILE2="start2.kix"
FILE3="kedit.ico"
FILE4="kix32.exe"
FILE5="kx16.dll"
FILE6="kx32.dll"
FILE7="kx95.dll"
[SourceFiles]
SourceFiles0=X:\
[SourceFiles0]
%FILE0%=
%FILE1%=
%FILE2%=
%FILE3%=
%FILE4%=
%FILE5%=
%FILE6%=
%FILE7%=

&nbsp;