Assuming i have an executable called mainprogram.exe and another called Update.exe. What I want to acheive is: when Update.exe is started, it replaces mainprogram.exe with, for example, C:\Program Files\MyProgram\mainprogram.exe. The point is to include the executable that needs to be replaced in Update.exe so it would be an all-in-one solution.
Also note that I can’t create Update.exe that will download the mainprogram.exe from internet, it has to be already included in Update.exe.
In building:
At runtime (update time)