How to overwrite an executable file?

Possible duplicate:
Overwrite the executable in C: \ Program \ MyProg in Windows Vista

I have an application written in C ++. He works. how can i make it overwrite my own exe file so that the next time it starts it will be a new exe?

How to auto update?

+3
source share
3 answers

This is not done in practice. This is usually done like this:

Original program:

  • Run a small updater.
  • Abort

Update program:

  • Wait for the original to complete.
  • Move the original to the side (for example, rename it to ".old").
  • Move the new version into place.
  • Launch the new version.
  • Abort.

, , .

+2
  • .
  • .
  • prog exit, , . , "auto delete".

, . , .

0

( , ), , , -

0

All Articles