How do I invoke an exe that is an embedded resource in a .Net assembly?



I have a non-.Net executable file that is included in my .net assembly as an embedded resource. Is there a way to run this executable that does not involve writing it out to disk and launching it?

This is .Net 2.0.


You can load a .NET assembly from a byte array using an overload of Assembly.Load.

However, there are implications for the security model that need to be considered which make things more complex. See the discussion here, and also this thread.

If your embedded executable is not .NET then I think you will have to write it out to disk first.

Answered By – Rob Walker

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More