EXE To CAB Converter ver 3.1, by Yuri Niyazov. 7/30/97

Included is a Win95 GUI application designed to convert SFX CAB files
(files that you can download from the MicroSoft web or ftp sites) to 
standard CAB files that can be viewed with the EXTRACT utility included
with Windows 95 or the Cab File Viewer Powertoy, included with the freeware
package called MS PowerToys. The problem with the self-extracting/
self-installing files like MS IE 3.0 is that once you start the file, it
will do everything automatically, without giving the user a chance to, for 
example, scan the contents for viruses or just look and see what kind of 
files are included inside. This utility will strip the starting code that 
extracts the files, leaving you with normal cab file. 

SFX means SelF eXtracting.

Requirements:
Windows 95 or later. A computer would be nice too.

It might run under the WIN3.1+Win32s configuration, but I have not tested it
on that platform so I do not know. Same applies to Windows NT 4.0.

Usage of the utility:
1) EXE2CAB 
2) EXE2CAB exefile
3) EXE2CAB exefile cabfile

The following examples are based upon my computer's directory structure: I have a c:\windows folder, with a cabs folder in it, with a file mfc42.exe that I downloaded from the ms web site in the cabs folder. Adjust the examples to your computer.

1) If you start EXE2CAB with no parameters, it will display two common dialog boxes:
"Open" (title of the box will be "EXE2CAB - choose input file") and "Save As" (title of the box will be "EXE2CAB - choose output file"). In the first dialog box, select the file that you want to convert. In the second dialog box, an output name will already be typed, and all you have to do is click on "Save", unless, of course, you would like the output file to be stored in a different folder or have a different name. If you click Cancel in either of those boxes, a Message Box will be displayed telling you that the file was not converted, and the program will exit.
2) you can also start exe2cab with one parameter: the input file. For example, in method one, to convert the file C:\windows\cabs\mfc42.exe, you'd do the following: dbl-click on EXE2CAB, select C:\windows\cabs\mfc42.exe in the "choose input file" box, click on save in the next box, and wait until the program completes. here, you can do all of that at one step: go to run, type 
exe2cab c:\windows\cabs\mfc42.exe
press enter, and that's it. The program will save the output file as C:\windows\cabs\mfc42.cab
3) If you don't want the program to save the output file like in method 2, you can specify the output filename here: if you type 
exe2cab c:\windows\cabs\mfc42.exe c:\new.cab
the program will convert mfc42.exe, but write the output to c:\new.cab
Note that EXE2CAB will not, under any circumstances, replace an already existing file. If there already is a file mfc42.cab in the \windows\cabs folder, example 2 will fail, and will display an error message "Unable to access output file". If there already is a c:\new.cab, example 3 will fail and display the same error message. Example 1 will fail as well if you select a file that already exists in the "choose output file" dialog box.

Ver 1.0 program used a pretty brain-dead algorithm to figure out whether a
file can be converted to .CAB file, so there were many executable files 
that it couldn't convert, and it would claim that it did. This version was distributed  for only about a week, and then was replaced by 2.0

Ver 2.0 of the utility worked with a pretty good accuracy, but it caused a GPF on some non-SFX files, was character based and didn't convert .CAB files that were created using other self-extractors. Also, if a file was not a SFX .CAB file, the program would leave a 0-length .CAB file after it exited. This version was distributed for 5 months.

Ver 3.0 Is an enhancement for version 2.0. A lot of the code in 3.0 was taken right from 2.0 without any change. However, the GPF bug is fixed (I hope, if you 
find it to be not so, please tell me), there is a Windows UI, and it can convert other .CAB files too. This version was distributed for 2 months

Ver 3.1 (This version) A minor enhancement to version 3.0:
It is possible to have SFX CAB files that are actually MS-DOS executables, and version 3.0 could not handle them. These are rare, they are not created by Microsoft, instead, any user of Windows 95 can create them by going to MS-DOS prompt and typing:
copy /b %windir%\command\extract.exe+file.cab file.exe, where file.cab is an already existing CAB file, and file.exe is the name of the new SFX executable. After that, just double click on file.exe and it will extract all files inside of that original cab file.
A lot of thanks goes to Carsten Schaefer for pointing this out to me. 
Another bug fix: if you run version 3.0 using itself as an input file (meaning running exe2cab and selecting exe2cab.exe in the first dialog box, it would run, say it converted successfully and create an exe2cab.cab file, which was NOT a valid CAB file. This has been fixed in version 3.1: it will indicate failure if run using itself as the input file. HOWEVER, running version 3.1 exe2cab.exe and selecting version 3.0 exe2cab.exe as the input will still create an invalid exe2cab.cab. This bug can not be fixed.

If you have a directory to which you always download new files from the Internet (something like c:\download), you can move exe2cab to that directory or create a shortcut and tpye C:\download in the "Start in:" field in on the Shortcut tab window that you get when right-clicking and selecting properties menu item. This way when you start exe2cab it will point to that directory right away, making it much faster for you to find the file you need.

This program is freeware. You can distribute it to anyone, in fact I 
encourage you to do so, as long as it is given for free and unmodified. 
However, I do ask you to register it because I would like to know how 
far it spreads. Registration is simple: 

Send an Internet e-mail to the following addresses:

redshoe@juno.com
yuricake@geocities.com

In your message include your name and how you can be reached (Internet e-mail or Fido-mail, or address.) Address is not mandatory, however, please be sure to include country and city. Include the program's version number as well.

If you register (and you should) you will be notified by e-mail of updates
to this and other programs written by me. I will most likely send 
notifications by snail-mail, but an e-mail address is preferred.

Latest versions of the program are always posted to www.windows95.com. There you can also find tools to create CAB files, as well as tons of other freeware/shareware programs. I also am working on my personal web page. It is not much to look at right now, but you will get the latest version of EXE2CAB there. It's URL is:

http://www.geocities.com/SiliconValley/Way/3740/

If you like my program and feel generous, a small contribution will be GREATLY appreciated. Write a check or money order in US dollars made out to Yuri Niyazov and send it to my mailing address:

Yuri Niyazov
97-05 Horace Harding Expressway Apt. 18F
New York City NY 11368
USA

If you are in Germany, you can find this program as well as 270 other cool freeware-programs on Softshack's 'Freeware for Windows 95 CD'. If you're interested in
ordering, please contact ubruegma@ki.comcity.de. The price for one CD is
12,98 DM, but may vary depending on the amount of ordered items.

Source code for this program written in C++ is available to developers for 
the price of $10 (you can bargain). To obtain it, just send me a message 
to the above addresses and we will work it out.

Because of the complicated world that we live in, the following DISCLAMER
became a necessary part of everything that we have access to. In normal 
English it means: Use EXE2CAB at you own risk. So here it is:

DISCLAIMER:
Users of EXE2CAB must accept this disclaimer of warranty:

"EXE2CAB is supplied as is. The author disclaims all warranties,
expressed or implied, including, without limitation, the warranties of
merchantability and of fitness for any purpose. The author assumes no
liability for damages, direct or consequential, which may result from
the use of EXE2CAB."
