.EXE Resource Embedded

N

Nige

Hi

Is it possible to execute an embedded .EXE resource, without first having to
re-create the file as a .EXE and then starting the process with shell or the
Process class?
 
R

Richard Grimes

Nige said:
Hi

Is it possible to execute an embedded .EXE resource, without first
having to re-create the file as a .EXE and then starting the process
with shell or the Process class?

Well, you could use Assembly.GetManifestResourceStream to read it, then
copy it to a byte array and load it with Assembly.Load. Next you'll have
to find the entrypoint (which is usually a static method called Main,
but might not be) and then invoke that method.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top