Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merge msi and exe

Tags:

c#

deployment

My deployment project creates and .msi-file and an .exe-file. Is it possible to merge these into one .exe?

like image 598
Presidenten Avatar asked Feb 11 '09 08:02

Presidenten


People also ask

Can an MSI run a exe?

msiexec can open only . msi packages. Even if your setup.exe contains . msi package you won't be able to run it this way.

How do I convert an MSI file to exe?

Create Msi from Exe Using Free MSI Wrapper 1. In the Source Folder field, specify the folder with the EXE file that you want to convert to MSI. 2. In the Target Path field, specify the default folder in which the created MSI will be installed.

Is MSI and exe same?

The main difference between the two extensions is their purpose. EXE is used mainly to indicate that the file is an executable one. In comparison, MSI indicates that the file is a Windows installer. While an MSI is used only with installers, this is not the case with EXE.

Should I use MSI or exe installer?

Rule of thumb: Unless you know what you are doing, it is recommended to use the setup.exe file whenever you have the choice between a setup.exe or an . msi file after you unpack a software installer on your system.


1 Answers

Yes, you can create a self-extracting installer containing both MSI and the setup.exe bootstrapper file.

I think it is possible to do that with WinZip, or you can use IExpress coming with Windows. Here is a guide how to create a self-extracting executable with IExpress. You can either use the IExpress wizard or manually write a config file which you then can execute in the post-built step of your setup project, e.g. by calling

IExpress /N /Q MySetup.sed 

A sample configuration file would look like this:

[Version] Class=IEXPRESS SEDVersion=3 [Options] PackagePurpose=InstallApp ShowInstallProgramWindow=1 HideExtractAnimation=1 UseLongFileName=1 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=MySetup.exe FriendlyName=My cool application AppLaunched=CMD /C setup.exe PostInstallCmd= AdminQuietInstCmd= UserQuietInstCmd= FILE0="setup.exe" FILE1="MySetup.msi" [SourceFiles] SourceFiles0= [SourceFiles0] %FILE0%= %FILE1%= 

There is a little caveat however with the self-extracting installer scenarios. Due to another fix these scenarios are broken with the bootstrapper (setup.exe) created by VS2008 SP1. For a workaround see the following thread: http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/3731985c-d9cc-4403-ab7d-992a0971f686/?ffpr=0.

like image 139
Dirk Vollmar Avatar answered Sep 21 '22 10:09

Dirk Vollmar