Print this page

Create self extracting windows executables under Linux

 

Create self extracting executable under linux


1) Download ftp://ftp.info-zip.org/pub/infozip/WIN32/wiz502xN.exe

2) Save the executable into a folder of your choice.

3) Unzip the executable using unzip

4) Find the file named "sfx32.dat". This is the self-extracting stub
you use to create a Windows GUI self-extracting archive.

5) In Linux create, your zip file as you normally do.

6) Concatenate the stub file, "sfx32.dat" and your zip file to an .exe file.
Example: cat sfx32.dat myzip.zip > myzip.exe

7) Run "zip -A" on the .exe file you just generated. The "-A" tells zip to
adjust offsets to the data past the extractor stub. Example:

zip -A myzip.exe
myzip.exe: adjusting offsets for a preamble of 86038 bytes

This now seems to NOT be necessary, as just creating the exe as above
results in a self-extracting exe under Windows

8) Access the self-extracting archive from Windows and extract.