You can load another assembly from a byte array with:
Code:
Dim A as [Assembly] = [Assembly].Load(ByteArrayHere)
So, if the exe is a .net assembly, you can call the public shared Main method this way, but it will run in your thread of execution. You might could get it to run in another AppDomain (almost like running in it's own process), but I don't have any experience with using them.
Here's an interesting idea for you -
.net has a way of creating assemblies dynamically via code you write. I fooled around with it a little bit. You use the System.Reflection.Emit namespace, which has a class called AssemblyBuilder. You use other classes (such as TypeBuilder to create classes, and MethodBuilder to create methods in the classes), and then call AssemblyBuilder.CreateInstance() to create an instance of it.
This way it all happens programatically, there's no embedded resource, and you can customize the code based on what your existing code needs it to do.
This is probably more than you wanted to do, but keep it in mind for a rainy day.
Chip H.
____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first