Hi everyone.
I'm using my friend's code for auto-update of my program. The code: http://pastebin.com/SEHpKrEK.
As you can see, it compares the two versions, if the remote version is bigger, it downloads the new file, using a batch
file it kills the current, renames the new one and runs the new one.
However.. I don't want to use a batch file. I've heard it's possible to use File.Move to rename the current process to say,
old.bak.exe, and then, download the new one with the name of the program, launch the new one and kill the old one. Upon launch,
to check if old.bak.exe exists. If it does, remove it.
How would I do that exactly?.. I'm sure it's possible to rename it, but how would I do that? Can anyone guide me? Thanks!
I'm using my friend's code for auto-update of my program. The code: http://pastebin.com/SEHpKrEK.
As you can see, it compares the two versions, if the remote version is bigger, it downloads the new file, using a batch
file it kills the current, renames the new one and runs the new one.
However.. I don't want to use a batch file. I've heard it's possible to use File.Move to rename the current process to say,
old.bak.exe, and then, download the new one with the name of the program, launch the new one and kill the old one. Upon launch,
to check if old.bak.exe exists. If it does, remove it.
How would I do that exactly?.. I'm sure it's possible to rename it, but how would I do that? Can anyone guide me? Thanks!