Click here to Skip to main content
15,911,707 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
(sorry for any English mistake) That's the problem: I've created my own install interface whith a form C# project. It allows user choose the path of app and, more important, creates tables in MySql. In my entire project I have a .msi of my main project, dependents .exe, like FrameWork 3.5 and Foxit PDF Reader, the form project that is responsible for dialogs screens and a VB Script that searchs for a resgistry key of Framework. If Framework 3.5 is not installed vbs file prompts user about this need and install it. After that, dialog starts install main program and mysql, creating databases and tables. So, I want "hide" all my files in one .exe. When user click on .exe, .vbs(file openned after extraction) is openned and starts the install process. I know winrar sfx, but that allows user extract and see files that were hidden. I noticed that a lot of .exe install programs doesn't permit extraction. How does it done? That's I want!
Even in Visual Studio Setup project we have, after debug, .exe and .msi files. How can I merge them? I've tried iexpress, but it also gives possibilities of extracting "hidden" files.
Thanks
Posted

1 solution

You may use "Pre-build event command line" and "Post-build event command line" in Project Properties -> Build Events.
Add commands for invoking 'packagers' which you maybe find on this topics:

http://www.liutilities.com/articles/merge-two-exe-files-using-free-software/[^]

http://stackoverflow.com/questions/2268515/merge-two-exe-files-into-one-programmatically[^]
 
Share this answer
 
Comments
flabegalini 16-Jun-11 11:26am    
But I have 2 Form projects, one of them (main project) will be installed and I've created a .msi for that, but another one I don't want install, its role is provide a custom dialog whith user and install Mysql in a specific path inside application folder, and before execute dialog form, I should search for Framework 3.5, after all, if Framework does not exist, Dialog Form can't be executed, since it was built on Framework 3.5, so I have .vbs for that. What I want is exactly what winrar SFX does. Merge all files in single .exe, and choose .vbi(or .vbi changed to .exe) as first ( and unique) open file, it searchs for framework, if that were installed, .vbi opens Dialog form, if not, install framework and, after that, open Dialog Form. However, I don't want allow user recognize that .exe is a .sfx, extract and see my files. How programs install like CorelDraw are done? Their installs seem to be a single .exe file.
Ubloobok 17-Jun-11 3:12am    
So, i think exists two ways:
1) Convert dll's into binaries stream, save it one EXE file, invoke it from concrete byte position. It's a very hard and long way, sorry i don't know how you can do this.
2) Try to get more knowledge about MSI Installer. It has many parameters and customization properties. MSI can check existing concrete Framework version and other programms. As i know MSI can invoke other DLL's and EXE files. But then you not merge files into one.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900