Solved

Binding files in C#

Posted on 2008-10-05
6
432 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now