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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating an application 1

Status
Not open for further replies.

NiteCrawlr

Programmer
Mar 16, 2001
140
BR
Hi,
I´m having a litle problem, There is an application which is installed in a server. I´ve created a shortcut (calling the application) on the desktop of some client computers. the problem is when I want to update the application, I have to ask everybody who´s using it to stop, and after that I can update it. Is there any way I could update the app without having to ask everybody to stop using the app?
BTW I´m using Delphi 1 ( I must use it because of the computers - Pentium 133, 16Mb and so on )

Thanks in advance

Nite
 
Have a copy of your old app; call it App1.exe. Have the shortcut point to it.

Copy in your new version; call it App2.exe. Change the shortcut's target to point to App2.exe, by right-clicking and choosing Properties. You don't need to rename the shortcut, or create a new shortcut; and since users are only momentarily using the shortcut, you won't get error messages from Windows when you try to change it.

Then tell your users that if they want to run the new version, they should exit, and double-click the shortcut again. -- Doug Burbidge mailto:dougburbidge@yahoo.com
 
But there will be about 700 people using it, and they will be in different buildings in different States.
 
I want something like Liveupdate, so I don´t have to ask everyone to stop using it, the next time they use it, it will be updated.
 
You could periodically check for some special external file in the app directory, or a new version of your exe, for that matter, and take the appropriate action you want.
For example, suppose app2.exe gives the users a 'wait for an update' message, and after everyone's left the app, you can update tha main app.exe.
After you have finished updating, create a new external file 'i_am_finished_updating' and the main app.exe can be loaded by all 700 of them ('nice' load on your fileservers and network though...)

HTH, TonHu
 
I think what is missing from the suggestions so far is that they all involve manually modifying the shortcut definition on each of the 700 workstations.
I am sure that some api exists for desktop shortcuts which could simplify or automate this process. The difficulty would then be to get 700 users to run the utility which would update their desktop's shortcuts. Having supported large remote user-bases, I can testify that this is no small task.
What I have done with one of my applications is to add a launch-wafer to the program. It works like this...

App1.EXE (which has 700 remote desktop icons pointing at it) is a small fixed program whose functions will never change or be enhanced. Its only function is to read an ini or database to get the name of the current version of the program, and then to launch that program.
When I want to update the program, I just copy the new version to my shared server with a unique name and change the ini/database entry. All of my users continue to run the old version for the rest of the day, but when they log on the next morning, App1.exe runs the new version.

I actually took this idea a little farther as my needs evolved. I added one record for each registered user of the program, allowing me to designate different versions for different users. (This is great for pre-release beta testing) I also update each registered user's record each time they run the program so that I know if they are actually using the new program or that they have just left the old program running overnight.
I also added a timer to my main application. Once per minute, it checks to see if a file called newversn.key exists in the program's directory. If it does, it pops up a messagebox, telling the user that there is a new version available which will be activated the next time the double click on their desktop icon. My wafer program deletes this key file each time it runs.
This approach has worked very nicely for me on a terminal services based wan with about 200 users. I'm sure it would scale up to your needs if handled carefully.

Some comments on implementing a wafer...

1). Use the $M directives to minimize its memory usage. Once you have all of your wafer functionality coded, play with the $M values to be bearest minimum. Remember that both the wafer and actual application have to fit in memory at the same time.
2). Once the launch works, the wafer should terminate so that the extra startbar box doesn't confuse your users.
3). Name your actual application the same as your wafer but with a version number at the end of the name. That way, semi-tech users won't be confused by the discrepency between the program name in icon's properties and the actual task which is launched.
4). If you choose to put the splash screen in the wafer, don't include a version number on it since the wafer will not be changing over time.

Hope this helps!
Peace,
Colt.
 
> I think what is missing from the suggestions so far is
> that they all involve manually modifying the shortcut
> definition on each of the 700 workstations.

Hmm; I was thinking in terms of the shortcut being on the network drive. Then NiteCrawlr would change just this one shortcut.

But you're right; this doesn't have the convenience for the user of a shortcut right there on his desktop. Perhaps a shortcut on each user's desktop, all of which point to a single batch file on the network drive; then make the app1/app2 changes in the batch file? This is similar to, but simpler than, your wafer solution. Though I do like the wafer solution; very nice. -- Doug Burbidge mailto:dougburbidge@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top