Original Post
Right now I have a simple patching program. It just compares files on the webserver with local files and if anything is different the new version is downloaded. However, I would like to build in the functionality where my patch program can update itself (so it can download a new version later that would do binary checking or download through FTP instead of HTTP). Last I tried, you can't open the exe file and rewrite it while you're running it. So how do I download the latest patcher.exe file and overwrite the current one? Also getting it to restart itself with the new copy would be good too. Of course I suppose I could also hack together some batch file that would: -launch when patching is done -wait a few seconds -delete old patcher.exe -rename patcher.exe.new to patcher.exe -launch patcher.exe My best assumption is you should be able to queue up some DOS commands like that which execute after the program officially ends, but that's just a speculation. I'm certain there's gotta be a simpler way to do it. Anyone know how it's done?