Hacker News new | ask | show | jobs
by veyh 247 days ago
> Windows generally treats running binaries as locked. Any attempt to overwrite a running binary should throw an exception. Again, the Zed source provides a reasonable solution.

While it's true that you can't overwrite a running binary on Windows, you can still rename it.

For example, the updater I wrote for AutoPTT downloads the new update to a temporary directory, renames all old files to ${file}.bak, then moves over the files from the temporary folder, and finally runs the new binary while exiting the old one.