.EXE Resource Embedded

  • Thread starter Thread starter Nige
  • Start date Start date
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?
 
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
 
Back
Top