Hacker News new | ask | show | jobs
by agateau 1125 days ago
A little known fact about executables on Windows is that while it's not possible to remove a running executable, it's possible to rename it.

I use this in Clyde [1]: on Windows, when clyde needs to upgrade itself (which means uninstalling vN and installing vN+1) it renames itself from `clyde.exe` to `_clyde.exe`. I leave the old `_clyde.exe` around, but a nicer implementation could remove on the next start.

[1]: https://github.com/agateau/clyde