Strategies For Replacing Program Executable in Windows

后端 未结 3 1133
滥情空心
滥情空心 2020-12-11 08:06

I have a Windows program that needs to update itself from a server automatically.

It is already able to transfer files from the server and update + validate things l

3条回答
  •  孤城傲影
    2020-12-11 08:53

    1. Running exe downloads the new one, puts it somewhere
    2. Running exe renames itself to anything (like .exe.tmp)
    3. Running exe puts the downloaded exe where the running one is (named just like the original)
    4. Running exe starts the downloaded exe
    5. Downloaded exe checks for .exe.tmp file, if found deletes it and kills the old running process
    6. Done

提交回复
热议问题