Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

self-extractor that will extract and run a file

i have two files, an EXE an DLL

the exe is a build of a vb.net application and i need the DLL in there too

what i want is a self extractor that will put these files together, then when run it will extract them and immeidately run the EXE

is there a VERY SIMPLE and EASY TO USE OUT OF THE BOX software that will do this? commercial or not, it doesnt matter

like image 863
Alex Gordon Avatar asked Aug 18 '10 02:08

Alex Gordon


People also ask

How do I make a self-extracting executable?

To create a self-extracting Zip file from the currently open Zip file, click Self-Extracting EXE in the Tools tab. Self-extracting Zip files have an extension of . EXE and can be run as commands. When a self-extracting Zip file is run, the files in the Zip file are automatically extracted.

What are self-extracting files?

Self-extracting files are used to share compressed files with a party that may not necessarily have the software to decompress a regular archive. Users can also use self-extracting to distribute their own software.

What is WinZip Self Extractor?

WinZip® Self-Extractor creates self-extracting Zip files. These self-extracting Zip files are ideal for electronic file distribution, because they contain multiple compressed files, minimizing download time and ensuring that important files do not become separated.


2 Answers

You can use NSIS (free and open-source). It's very flexible, yet it can be used for such simple tasks, too (and it has served me well in such cases). Assuming your files are named yourapp.exe and yourlib.dll, you could use this script:

# this will be the created executable archive
OutFile "archive.exe"
# define the directory to install to, the installer's directory in this case 
InstallDir $EXEDIR

# don't create a window for the unarchiver
# You could get fancy and do all kinds of configuration 
#   in the non-silent install; this example is the simplest it can be.
SilentInstall silent

# the executable part
Section

# define the output path for the following files
SetOutPath $INSTDIR
# define what to install and place it in the output path...
# ...your app...
File yourapp.exe
# ...and the library.
File yourlib.dll

# run your application
ExecShell yourapp.exe

# done
SectionEnd

Install NSIS, create this script as archive.nsi, right click it and select "Compile with NSIS". The file archive.exe will be created.

Then, on the target system, all the user needs to do is launch archive.exe; the script will unpack and run your program.

(If you want to get fancy, you can look into the tutorials that are installed with NSIS, or see this page.)

like image 98
Piskvor left the building Avatar answered Sep 20 '22 07:09

Piskvor left the building


You could try WinZip.

like image 22
Dave Markle Avatar answered Sep 23 '22 07:09

Dave Markle