Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

updating exe

Status
Not open for further replies.

garwain

Programmer
Jan 30, 2002
461
CA
I have a program for internal office managerment, that is constantly being developed. I have added a feature to alert users when a new version is available, but I'd like to perform an update (this test is being performed in the oncreate event for the main form.

Any ideas as to how I could go about this?

thanks.
Ben Martin
 
You could load new updates into the database, and have a launcher program which checks for new versions and if there is one, it prompts the user to install it. You have to have two separate programs though because your app can't be running while it's being overwritten.

TealWren
 
Ok, this could use another approach: Install the app on your network server, and as it's 1 EXE only, will only require loadtime (= networktime) once at system-startup. During some non-office time, schedule a NT event, Unix cron etc. to update the app-exe, and next day everyone has the same, and most recent version of your app... This has been a best practice for long years with Novell networks (remember WordPerfect 5.1), and being admin etc. you'r even allowed to see who is currently using the app.
Updating on the workstation could be performed with some nice component, currently not updated, and hasn't been for a long time, called UOL or UpdateOnLine and can be found at The available version will do for your purpose I assume, I tested it once, and was quite impressed, but couldn't use it at that time. There are similar comps on but I haven't tested them.

Good luck!
TonHu
 
Here's another solution which I use to solve the same problem.
I place the exe file on the network. I also have a second exe file, call it update.exe.
Now my main program call it main.exe in the onclose event checks the date of the main.exe and compares it to the date of the exe file on the network. If the network version is newer, then update.exe is called as my main program is terminating.
Update.exe automatically copies the updated program over the just terminated program. Works fine.
 
Ben,

TealWren has the approach I find most workable, which is to use a launcher that compares the version number of the version installed on the client's PC against the latest "central version"

For example:

1. User clicks icon, which fires tiny version checker (tvc).
2. tvc compares the user's current version number against centrally stored "current" version. If different, user is prompted to download an update.
3. When all that's been taken care of, tvc starts the real application.

Given the automatic versioning that was added in Delphi 4, it's basically free and transparent to the user. Here's one reasonably simple way to determine your application's version number:
BTW, the reasons I don't use databases for this are:

1) Most databases formats require one or more libraries to be loaded. Since your update may possibly revise/replace those libraries, it's easier to over-write them than to force the user to reboot so they're no longer in use.

2) IME, users are more comfortable using NotePad to edit config files than they are mucking about with arcane binary formats, such as the Registry.

3) Explorer displays VERSIONINFO data when you right-click a file and then choose Properties. Again, it makes support easier.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top