How to package installation (framework + application) into one executable file?

I would like to create a file 'setup.exe' which contains one application that I developed in C # and a .Net framework 4.0 setup.

The idea is this: when I run setup.exe, it checks for .net framework 4.0 on the computer and if not install it!

Using InstallShield 2009.

Does anyone know how to do this?

Let me know if you don't understand anything.

Thank.

+3


source to share


5 answers


I resolved this issue by creating a custom action, it would be the "Open Executable" type, and I called this custom action in the wizard button event.



0


source


As for the installation, you can use the built-in mechanism that comes with Visual Studio, they allow, for example, to make setup.exe automatically check if the correct version of the frame is installed and install it, if not - see MSDN for a good start .

As far as the fact that your application / EXE consists of 1 file, including all managed dependencies, you have several options:

OR



  • use some tool like SmartAssembly (commercial)
    it can be embedded and merged by the way (no need to change source code).

OR



+2


source


There are many frameworks for creating customizations.
My favorite is WIX, you can download it here: http://wix.sourceforge.net/
There is also a framework for building WIX interfaces using C # called sharpsetup, you can download it here: http://sharpsetup.eu/ but I'm not sure this will suit your needs, as the target machine may not have .NET to start with (although it would be possible to write the setup in .NET 2.0, I'm not sure).

Learning WIX can take a while, but once you get past that, it shouldn't be too hard to do what you want.

+2


source


Can a complete (shredded) installation be packaged in a self-extracting machine? You can use WinRar or similar to create a compressed exe using "autorun".

+1


source


Not possible with standard InstallShield 2009 as far as I know. You must have at least InstallShield 2010 (with the Installshield 2010 Extension Pack for Visual Studio 2010).

I don't know if there is a way to "hack" it in ...

0


source







All Articles