Replacing the file from which the code is executed

  • Thread starter Thread starter hoenes1
  • Start date Start date
H

hoenes1

Hi all,

how can I replace the file I'm executing at the moment? I want Windows
to end the process, perform the copy/update action and then restart
the new file. Are there any handy mechanisms?

Thanks in advance.
 
Hi hoenes1,
how can I replace the file I'm executing at the moment? I want Windows
to end the process, perform the copy/update action and then restart
the new file. Are there any handy mechanisms?

- start a second app
- terminate your app
- replace the exe in your second app
- start the app again
- terminate second app

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Hi hoenes1,
how can I replace the file I'm executing at the moment? I want Windows
to end the process, perform the copy/update action and then restart
the new file. Are there any handy mechanisms?

An other solution is to rename your EXE (this is possible) and then write
the new exe and start the exe and terminate.
--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Jochen Kalmbach said:
Hi hoenes1,


An other solution is to rename your EXE (this is possible) and then write
the new exe and start the exe and terminate.

Jochen,

thank you for your proposals. These were the techniques I would think
of, too. I thought there could be a special Windows way, but your
proposals are ok for me. Thanks again.
 
Back
Top