Solved

Binding files in C#

Posted on 2008-10-05
6
440 Views
Last Modified: 2012-05-05
Hey,

Is it possible to bind two files into one file ? If its possible how ?

E.g if i got two files a.exe and b.exe then i want to bind them into c.exe so when i execute c.exe it'll automatically execute a.exe and b.exe

Thanks
0
Comment
Question by:ravedome
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 22647407
That's not possible.
The only thing that you can do is to crate a .bat or .cmd file where you add a reference to both files and execute it.
The file would be something like this:
start a.exe
start b.exe
0
 

Author Comment

by:ravedome
ID: 22647463
It can be done e.g http://www.safe-install.com/programs/file-joiner.html and i've seen exemples doing it in VB, just curious whether it's possible to do in C#
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 125 total points
ID: 22648928
I guess that you can compare this program with a zip-program. Add it to one package and built an exe from it. When clicking the exe, it will extract the exe and run it. Afterward the second one.
I haven't seen it before in coding. (I don't see any reason why you should create something like that, because it can get a very huge file, which will need a lot of memory)
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 125 total points
ID: 22655523
filejoiner is a tool for packing different kind of files into a single file so that they can be transported together in a single file
but what you are are asking is that bundline 2 executables - generating a single exe and then when you execute that single exe you get the functionality of both the bounded executables

either you can get the sequential exe by using the BAT file as suggested by Dhaest or you can use reflection to load both the assemblies and then execute the required methods through reflection based on your requirements. The following link might help towards that
http://gsraj.tripod.com/dotnet/reflection.html
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question