Solved

Binding files in C#

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

770 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