none
VS2010 Setup & Deployment Project: Convert msi installer to a single self-installing exe

    Question

  • I am using a setup & deployment project template to build an installer for a Windows forms application developed in Visual Studio.  The output of the S&D project is an installer which consists of two files: a small Setup.exe and large Application.msi database. 

    The two-file installer built by the S&D project works fine, but my website's download manager is designed for distribution of single-file downloads, and I'm wondering if there is any way for the S&D project to build a self-installing exe rather than the two-file msi/setup?

    I suppose I could package the two files into a zip archive, but it would really be a lot cleaner if the installer were a single self-installing exe.  What is the best way to do this?

    Thanks.


    -BGood
    Thursday, July 28, 2011 4:31 PM

Answers

All replies

  • You'll need a zip-type program. There's nothing in Visual Studio to combine them.
    Phil Wilson
    Thursday, July 28, 2011 8:48 PM
    Moderator
  • Thanks, Phil. 

    Yes, I suppose winzip or win7 would work, but uncompressing would add at least 1 more user step to the install.  I was experimenting with Inno Setup as an alternative to S&D if for no other reasons Inno Setup is free and creates a self-extracting exe.  Unfortunately I have not yet created a successful installer with Inno Setup, possibly because of the Sql Server Compact 3.5, .net Framework 4.0, and Reportviewer prerequisites.

    If anyone else has any ideas, please let me know.  Thanks


    -BGood
    Friday, July 29, 2011 2:58 AM
  • Phil,

    I found a bunch of shareware utilities which claim to convert msi installation packages to self-installing exe.  Product descriptions include:

    "MSI to EXE Creator is easy to use and professional application tool to create EXE (Executable File) from your Existing Microsoft .MSI (Windows Installer) files. Software installation program allows you to create installation packages from .MSI to .EXE extension files for your software products, with maximum ease of use and flexibility."

    MSI to EXE converter is a free ($39) tool that can convert MSI to EXE with less increase in its file size http://www.convertmsitoexe.com/

    Another product for $30: http://www.abyssmedia.com/msitoexe/

    Another product for $18: http://www.setupcreator.com/   

    So one approach would be for me to continue with the Setup & Deploy project template, then process the msi installer through one of these utilities. 

    Is anyone using any of these?

     


    -BGood
    Friday, July 29, 2011 4:04 AM
  • Hi BGood,

    It is an FAQ, please check this FAQ first http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/407b0fad-dbbd-428f-ac0c-b6bc581b8620#x_FAQAnswer12, then I will share some my threads that have some suggestions:

    And I recommend you to use the Windows Build-in tool: IExpress, Start button > Run.. > IExpress can start this tool.

    Please view the document about it: http://technet.microsoft.com/en-us/library/dd346760.aspx

     

    And there is a workaround to do install the prerequisites manually. Please write a Command Batch file, and we could in this batch file to install your prerequisites and run your setup program. Then compress this batch file and your exe/msi files into one file, set the startup file to this batch when the user uncompress your self-extracting executable.

    Sincerely,

     

     

     


    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by BGood Friday, July 29, 2011 2:59 PM
    Friday, July 29, 2011 4:06 AM
    Moderator
  • Thanks for a very comprehensive answer, Bob.

    I am currently testing several several setup & deploy options: VS2010 Setup & Deployment Project Template, Inno Setup, Actual Installer, and Indigo Rose Setup Factory.  At this point I have gotten farthest with the VS Setup & Deploy project, but the S&D project type apparently will not be supported by Microsoft, and the two-file setup/msi installer is problematic for my download system.  I like the single exe produced by Inno Setup, but so far have not figured out its scripting to handle my .net dependencies.

    My project has the following dependencies:

         Microsoft .NET Framework 4 (x86 and x64)
         Microsoft Visual Studio 2010 Report Viewer
         SQL Server Compact 3.5 SP2
         Windows Installer 3.1

    The IExpress tool sounds like it will do the job, but before starting with IExpress, do you have any references or examples of .bat scripts to handle project dependencies like mine?

    Thanks.


    -BGood
    Friday, July 29, 2011 2:59 PM
  • Write a batch just calll msiexec to install your Microsoft .NET Framework 4 (x86 and x64) (xxx.msi), Microsoft Visual Studio 2010 Report Viewer (another .msi file).

    You could test the msiexec in the command lineto install these tool first, then build a command line batch file (xxx.bat) to install them in your single setup.exe by IExpress, you could add it into your self-extraction file, and the install program to this file.

     


    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, August 01, 2011 11:42 AM
    Moderator
  • After evaluating IExpress and several other alternatives, I ended up using ExeMsiCombiner, a freeware/donateware application which seems to work perfectly for my needs.  At this point, the configuration consists of a Visual Studio 2010 solution with 2 projects, my VB application and its S&D installer, and then manually running ExeMsiCombiner on the .msi and .exe files generated as the S&D output to create a single self-extracting exe.  The next step will be to configure a post-build command line for the S&D project which will automatically run ExeMsiCombiner.  Thanks for everyone's input.

    PS: My dyslexia must be surfacing. My original post mistakenly referred to the tool as MsiExeCombiner.  The link is correct, I just got the name transposed.  Sorry.


    -BGood

    • Marked as answer by Bob_BaoMVP, Moderator Monday, August 08, 2011 4:24 PM
    • Edited by BGood Monday, August 08, 2011 9:57 PM Dyslexia
    Monday, August 08, 2011 4:21 PM
  • Good reply, and a good tool, thanks BGood for sharing it.
    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, August 08, 2011 4:24 PM
    Moderator