The 7-ZIP SDK does, in fact describe how to do this. TH attached is a file from the SDK.
The other techniwuq (using a temp file) would just use the executable to launch the EXE "silently" If you are using C++, then you could check out this article to see how to launch an executable from within code.