How to embed a resource programatically?

Say you have an exe file located in "C:\test.exe" (to be used as a resource). When I run this app it will check for "test.exe" file and embed into itself.

So the next time I run the app it will have the "test.exe" embedded and won't require the "exe" located in "C:\test.exe".

OR say I have an app (single .exe file) in which there's an empty embedded resource "test.txt". How can I write the contents of "C:\test.exe" to that empty resource from another app? Or probably create a new resource inside that already complied app?