Valhalla Legends Forums Archive | General Programming | New Version Download

AuthorMessageTime
Grok
What mechanisms are any of you using to download a new version of your program and launch it for the user, replacing the running version?

Grok1.exe launches, checks \\server1\Grok1.exe for version number.
Grok1.exe downloads new version,
closes itself,
overwrites old version with new one,
then launches Grok1.exe again.

Is anyone doing something similar with your bots?
September 8, 2004, 9:40 PM
Skywing
The easiest way is to rename whatever executables and then copy in the new versions.

Executables are opened for FILE_SHARE_DELETE on NT, so you can rename them while they are in use. Delete them after starting the new process.
September 8, 2004, 9:57 PM
Yoni
BNLS does something approximately the same (except it updates itself manually - on admin command, and not automatically).

On real (NT based) Windows, an exe can be renamed while it's running. So when an admin requests an update, BNLS renames BNLS.exe to "BNLS <current date and time>.exe" (without closing). Then it copies the new BNLS.exe to the BNLS directory. Then it spawns a new process that stops and restarts the BNLS service.
September 8, 2004, 9:58 PM
iago
On Linux, I have a shellscript that can be executed indepdantly of the program, which downloads/compiles from source/stops/starts the "service". It's not the best way of doing it, in my opinion, but it works well for me, since I have the script do a lot of other things (update downloads page, update documentation, etc.)
September 9, 2004, 5:01 PM

Search