I was just thinking, is there any way to provide automatic updates to an application? This would be very helpful in bug fixes, small changes to tighten configuration, and new features. Every one loves to get updates.![]()
I was just thinking, is there any way to provide automatic updates to an application? This would be very helpful in bug fixes, small changes to tighten configuration, and new features. Every one loves to get updates.![]()

Yes
You could use the MOOsock or another object to communicate with your server on the current version the user has installed.
Then use the download object to download a patch.
Thanks!!! I will start working on this immediately!
Okay. The Update system I'm designing uses two applications. The [color:#3366FF]Main App[/color] communicates to see if it is the latest version.
If it is not the latest. Then it opens The [color:#FF0000]Update App[/color] which saves the path (and what ever is going on in the [color:#3366FF]Main App[/color]).
Then it closes the Main App; Deletes the Main App Then it downloads the [color:#33CC00]New Main App[/color] to the path of the old [color:#3366FF]Main App[/color].
Once the [color:#FF0000]Update app[/color] is finished downloading. It Opens up the [color:#33CC00]New Main App[/color] (with the save information from the old Main App) Then the [color:#FF0000]Update App[/color] closes. Update Complete???
Is there a better way to do this? :grin:
If you wanted, what you could do is name each file something like NameOfFilev1.2.exe and if the name doesn't match a value sent from the server, download a new one and after that delete the old one. It only involves one app, and is seemingly much simpler.
I wouldn't delete the old main app until the new main app has succesfully downloaded, just incase it fails for some reason.
Yeah the reason why I thought 2 apps would be better, is because I was thinking that during the update process you would get a message Like:
---------
Error Deleting File or Folder
Cannot delete File.exe: It is being used by another person or program.
Close any programs that might be using the file and try again.
-----------
But having a different name could work. But it could also create some difficulties. One I could think of, is that after every update (on some peoples computers). You would get a warning because the file name has changed.
-----------
Filev1a.exe is attempting to connect to a DNS server
-----------
But I'll try it out.







Do not change the file name because the user can have created some shortcuts.
The process you can apply is the following :
- Check if update is available
If yes :
- Launch the updater program
- Close the main app
- Download the update in a temporary folder
- Check if the downloaded EXE is ok
- Delete the main app
- Move the downloaded EXE in place of the old
- Launch the new main app
- Close the updater