How to make an MSI that simply wraps an EXE file

Related searches

After way too many experiments, I've come to the conclusion that Windows Installer is simply bad technology. But the customers want MSI files.

So, how can I create an MSI file that extracts an EXE file to a temporary directory and runs it with options same or similar as were passed to the EXE file?

Options to an MSI are explained in Msiexec (command-line options) (low level "run" of an MSI is msiexec option package.msi).

EDIT: mjmarsh's WiX solution looks like it works. I just haven't had a chance to try it yet (crunch time). If it works, I'll be accepting it.

EDIT: it does not work. Missing piece: attended/unattended does not seem to be available.

Anyway, the only to make this work at all would be for the custom action to kill its parent process!

EDIT: So somebody posted as a further answer wrapping the whole thing as a post-install custom action. Theoretically possible but since a reboot may be required (thanks MS for .NET 4 requiring a reboot sometimes) we have to do further hackery. So from the matrix of advantages:

Transparency: No. One big custom action.
Customizability: No.
Standardization: No. 
Management and reporting: No. Appears to work but will not.
Security: No benefit.
Validation: No. The hackery required to survive reboot makes this sure to not work.
Resiliency: Completely defeated.
Rollback: No. Rollback didn't work when we were using MSI anyway.
Patching & Updates: No. We have a local solution anyway.
Logging: No. Appears to work but will not.

No point.

Adding to weir's answer, change the custom action attribute like below:

<!--Run Action-->
    <CustomAction Id="RunWrappedExe"
                  Return="asyncNoWait"
                  FileKey="ApplicationFileId"
                  Execute="deferred"
                  ExeCommand=""
                  HideTarget="no"
                  Impersonate="yes"/>

Setting Return=asyncNoWai does not wait for the exe to return. The installer does it's job and closes normally. Meanwhile, the exe continous its execution.

-Madhuresh

How to make an MSI that simply wraps an EXE file, After way too many experiments, I've come to the conclusion that Windows Installer is simply bad technology. But the customers want MSI files. So, how can I � If you need to deploy an EXE that doesn't support silent installation you can use a repackaging tools. According to my expereience free tools are unreliable, because they just wrap EXE in MSI. If you know parameters you can deploy EXE without wrapping it into MSI. In GPO you can create a ZAP file, for example.

Create msi from a batch file, You can wrap a .bat file instead of an executable installer. Let's say that you simply want to create a MSI package from a batch file and some other files belonging� First create a "Basic MSI" project and make sure you say you want no setup.exe generated. You set this in the Release settings. Then you essentially do the same thing as with WiX, but you have a UI for it. You can specify your helper EXE file by using the Direct Editor and putting your EXE file in the 'Binary' table

I think the easiest way to create a .MSI file is to use WiX.

Lesson 1 from the WiX tutorial is all you need to create a simple install.

Command Line Arguments, You can use the Windows Installer tool msiexec.exe to control the installation of an These parameters can make the MSI package install in silent mode where no When you need to use a command line with quotes you simply make two� How to Create Msi Package from Exe File. Author: Peter Barnett Date: Jan 17, 2020 . Sometimes software developers use only the EXE format to create their distributions. If you install programs manually on one computer, the installation EXE-file will be convenient and easy to use. And in this case, you do not need to create Msi from Exe File.

Wrap exe to msi - Active Directory & GPO, http://stackoverflow.com/questions/854873/how-to-make-an-msi-that-simply- wraps-an-exe-file. It's unfortunately not as easy as in running a� Let’s say that you simply want to create a MSI package from a batch file and some other files belonging to that script. You can do that using the MSI Wrapper. Here is an example of how to do that. The following code is a sample batch file, which will copy a test.txt file to the program files folder under the sub directory MSI Test.

No solution. We went NSIS as corporate MSI install is going to be broken anyway due to MSI nesting problem (just try installing EXE wrapping MSI from inside MSI someday).

Repackaging - Converting an EXE to MSI, Sometimes you need to wrap a third party (legacy) installer up as an MSI to simplify You probably have an "exe" file and ideally you want to run an " exe2msi" tested it is simply a matter of building the mechanism into the MSI ( frequently� Software developers who have a setup.exe and want to offer an MSI that wraps their original setup.exe. System administrators with a setup.exe they want to distribute as an MSI to client computers in their organization. Our MSI Wrapper is the tool that makes it easy to convert an executable setup program to an MSI package.

From the 10 second overview, it looks like a great package for deploying applications I develop, but doesn't look like I can simply wrap a .exe installer into an MSI file -- but I will dig deeper – GNUix Jun 9 '09 at 2:24

4. Name the file "filename.exe" and click Save. 5. Open iexpress. 6. Select "Create a new Self Extraction Directive file" and click Next. 7. Select Extract files only and click Next. 8. Name and configure the file. 9. Add the .exe file you created. 10. Follow the on-screen instructions to create the package.

On the Internet I came across the free utility Free MSI Wrapper. The utility has a simple and intuitive interface. 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. 3.

Comments
  • So, a lot of people are looking at this. Unfortunately there is no solution, and most of the developers are now in favor of not using MSI period.
  • It is entirely possible to run an EXE file during an MSI install, and I have done so several times. It is just a matter of sequencing and verifying that the EXE you run exits cleanly. MSI is generally hard to deal with and often requires specialist attention, but the benefit in terms of corporate deployment is very substantial. MSI does enforce a number of rules that make it hard to do unusual and dangeropus things during installation.
  • Glytzhkof: try invoking from inside a MSI a third-party EXE that's going to unpack and invoke several MSIs.
  • Please read: "Advantages of using MSI files" for a summary of the benefits provided by MSI files for corporate use.
  • How many is too many? Two? I've been doing MSI for 15 years and I promise that if you knew what I knew you'd change your mind.
  • If I had this answer back in 2009 I might have used it; however it's years too late and we would gain none of the advantages anyway.
  • ha ha.. may be it will be useful for somebody else
  • The installshield way is already known not to work. It does not extract to a temp directory but to the target directory, running into the same bug we are trying to avoid in the first place (modify date on target file is often flat out wrong).
  • Looks like WiX can do it w/ Custom Action and Binary element. Unfortunately the tutorial is currently busted but the help file in the download binary works.
  • Huh, I was unaware of the binary extraction issue with IS. What version do you use?
  • We recently had a customer who reported getting a cryptic, undocumented error when running the installer we created with InstallShield. We re-packaged it as an MSI and it ran OK. We are abandoning InstallShield after years of frustration, and converting to WiX.