How can I create another program from the primary/main program.
Like press a button and write/export an already compiled exe stored in a resource file or something. Or some other way of doing it.

Then run that .exe and use it's commands?
Like use the first program to tell the second program to pop up a message box?