|
-
April 18th, 2008, 10:54 AM
#1
combine executables
hi
i'm just wondering, how could we combine two executables (program A and program B) into one file (one executables, lets say program C), and if we run the 'program C', both the program A and B would be run. Because i've seen some program does this.
any idea on how I could do it? using C#?
thanks
-
April 18th, 2008, 11:52 AM
#2
Re: combine executables
Well if you want something basic you have a few implementation options in program C:
1. Assembly.Load()
2. AppDomain.Load()
3. Process.Start()
Have a look at those options and see which one is best for you.
-
April 18th, 2008, 11:20 PM
#3
Re: combine executables
 Originally Posted by nelo
Well if you want something basic you have a few implementation options in program C:
1. Assembly.Load()
2. AppDomain.Load()
3. Process.Start()
Have a look at those options and see which one is best for you.
thanks for replying, but as far as i know, these options won't combine two programs into one file, right?
-
April 21st, 2008, 01:43 AM
#4
Re: combine executables
Is is very strange demand. Are you sure it is the best way?
Only way I can imagine is to embed the two assemblies (A,B) as resources into the the result one (C), and if the C is run, it extract A.B from resources to specified (temporary?) folder and run them.
But as I've said before. It si strange. What is the reason for doing it?
- Make it run.
- Make it right.
- Make it fast.
Don't hesitate to rate my post. 
-
April 21st, 2008, 06:01 AM
#5
Re: combine executables
I agree with boudino. I was about to suggest the same thing but my tests were not successful. Although I didn't extract them to a temporary folder. I was hoping to use the Assembly.Load() overload which takes an array of bytes. I would get the array of bytes straight from the resource manager. But as I said it didn't work and I didn't have time to investigate why. Hopefully imin can verify if it is a viable option...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|