Link to home
Start Free TrialLog in
Avatar of shannonm
shannonm

asked on

Combine two executables into one

Is there a way to combine two executables into one?
Avatar of Madshi
Madshi

Theoretically you can simply store two exe files like this:

[exe1][exe2][length of exe2]

Now if start this combined exe, only exe1 is executed. exe1 can now extract exe2 to a new (temporary) file and start it thereafter.

Does this help?

Starting exe2 DIRECTLY would be much more difficult.

Regards, Madshi.
You can use next trick:
1. include 2-nd exe in RC file.
2. During job save this resource to
   disk (with LoadResource and    WriteFile).
3. make this file.
Alex

Avatar of shannonm

ASKER

Isn't there a way of wrapping the two into one file and starting the second (calling its main function) from the first without using WriteFile?

If not, what does job save correspond to in Visual Studio C++??

If not how would "extract" be performed??

ASKER CERTIFIED SOLUTION
Avatar of AlexVirochovsky
AlexVirochovsky

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial