Create and run app from memory

Giganews Newsgroups
Subject: Create and run app from memory
Posted by:  Matt Williamson (
Date: Mon, 7 Jul 2008

Is there a way to have a program create another exe and run it in memory
without writing anything to disk? I write a lot of cmd and vbscripts and I'd
like to wrap them into an .exe to run. My initial thought was to create an
exe that has code to make a copy of itself and then append an encrypted
version of a textfile (script) that I drag onto it to the end of the .exe
that gets created. I know that I could write the decrypted script to disk
and run it using shell/shellexecute but it would be much cooler to create
the script in memory and run it without writing to disk. I can't think of
any way to do it though. Any thoughts or suggestions?