process.start() embedded exe without extracting to file first c#

后端 未结 5 2312
南方客
南方客 2020-12-03 11:47

I have an executable embedded into my app resources. ATM I use assembly reflection to extract the executable to its own file and then start the executive using process,START

5条回答
  •  难免孤独
    2020-12-03 12:17

    It can be done without your native EXE having to touch the disk.

    See here....it shows an example of a "process" image being embedded as a Resource. It's read into memory, and then CreateProcess and a number of other things are done to build a valid running "process".

    • http://www.rohitab.com/discuss/topic/31681-c-run-program-from-memory-and-not-file/

提交回复
热议问题