[Solved] How can I deploy an exe file within my C++ code? [closed]


I want it to where when I launch the program it will ask the resolution, then deploy the prank executable in the current directory and run it, so that when I close my application, the prank is still running.

Compile the prank EXE first, then use an .RC file to compile and link the prank EXE into a binary resource of your main EXE. When the main EXE is run, it can extract the prank EXE to a file and then run it. There is no standard API in C/C++ for accessing resources, you will have to use platform-specific APIs, like the FindResource(), LoadResource(), and LockResource() functions on Windows.

Or, your main EXE could simply contain the prank code directly, and then run a separate copy of itself with a different command line to execute the prank code. You don’t actually need a separate EXE for the prank (unless you really want one).

0

solved How can I deploy an exe file within my C++ code? [closed]