Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > I have a .exe and .msi from a Setup and Deployment project how do I compress them into one .EXE so they are downloadable?
 

I have a .exe and .msi from a Setup and Deployment project how do I compress them into one .EXE so they are downloadable?

I have a .exe and .msi from a Setup and Deployment project how do I compress them into one .EXE so they are downloadable?
SetWindowHookEx  Friday, September 25, 2009 10:58 PM

There's no way provided to do this within Visual Studio. There are really two ways to deal with the issue:

  • 3rd-party products to handle this, e.g. WinZip Self-Extractor (http://www.winzip.com/prodpagese.htm)
  • Just distribute the MSI

I do the second: the setup.exe that gets built with your installer only does one thing that I can tell, which is to run the MSI. So now I just set the MSI up as the installer. Download, double-click, and it goes.

Rick Herrick, WG, MO  Saturday, September 26, 2009 8:07 PM
You may use the tool "IExpress" which is included in Windows for free. Just enter "iexpress" in the Run dialogue, and follow the wizard. It will help you create a self-extracting archive containing the .exe and .msi file.

If you create an SED file at the end of the wizard, you may include iexpress as a post build event in your Visual Studio project.

Note that self-extracting archives may not work as supposed when using the .exe bootstrapper created by Visual Studio 2008, due to the fact that it doesn't wait for the MSI installation to complete, and causing the self-extracters to delete the extracted .msi file before it has finished installing. However, if you use Visual Studio 2005 to generate the setup files, this should not cause any problem.
Sven N  Saturday, September 26, 2009 9:18 PM

There's no way provided to do this within Visual Studio. There are really two ways to deal with the issue:

  • 3rd-party products to handle this, e.g. WinZip Self-Extractor (http://www.winzip.com/prodpagese.htm)
  • Just distribute the MSI

I do the second: the setup.exe that gets built with your installer only does one thing that I can tell, which is to run the MSI. So now I just set the MSI up as the installer. Download, double-click, and it goes.

Rick Herrick, WG, MO  Saturday, September 26, 2009 8:07 PM
You may use the tool "IExpress" which is included in Windows for free. Just enter "iexpress" in the Run dialogue, and follow the wizard. It will help you create a self-extracting archive containing the .exe and .msi file.

If you create an SED file at the end of the wizard, you may include iexpress as a post build event in your Visual Studio project.

Note that self-extracting archives may not work as supposed when using the .exe bootstrapper created by Visual Studio 2008, due to the fact that it doesn't wait for the MSI installation to complete, and causing the self-extracters to delete the extracted .msi file before it has finished installing. However, if you use Visual Studio 2005 to generate the setup files, this should not cause any problem.
Sven N  Saturday, September 26, 2009 9:18 PM
Oh man, I looked everywhere for that and couldn't find it! I can't believe it just comes with Windows :) Thanks for the tip on that, Sven!
Rick Herrick, WG, MO  Tuesday, September 29, 2009 10:41 PM
Hi,If you want to convert msi to exe,I recommend you choose free msi to exe converter.It's free but  powerful!
you can find a guide here:http://www.convertmsitoexe.com/
toneming  Saturday, October 03, 2009 6:06 AM

You can use google to search for other answers

Custom Search

More Threads

• No Touch Deployment and Localization
• USB Deployment - Run from USB Stick
• Modify setup.exe?
• Publish using VB Express 2005
• Install always say you can't install you must remove first
• Modify The Shortcut Install Path
• Creating a batch file to install/uninstall application
• Issues in installing the deployed application in client machine
• Desktop Shortcut
• VS.net 2005 Installer: Not enough storage is available to complete this operation