# Friday, February 15, 2008

02/16/2008 correction: Thanks to Dave Crozier for finding a bug in the code (see comments below). A new zip file of AppUpdate.zip has been uploaded to the server. If you previously downloaded the zip you can download it again or make the change as described in the commments of this blog entry.

Updating Visual FoxPro Applications

One of the things that I tried to do in my article regarding ClickOnce was to provide Visual FoxPro developers with an understanding of one of the many solutions available for updating applications once they have been deployed. While ClickOnce is extremely powerful, there are times when a more home-grown solution can be more appropriate. Updating applications with applications that the developer has written and/or has the source code for can also provide a degree of flexibility and power that just isn't available in solutions such as ClickOnce or Installshield's update service. So, in this blog entry, I'll be presenting an application that I created using Visual FoxPro SP2 that can be used to update virtually any Visual FoxPro application.

AppUpdate.exe

AppUpdate.exe is what is known as a 'Loader'. This basically means that it is responsible for checking for updates, installing them if they exist, and then loading (running) the application it is in charge of updating. Relying heavily on the use of vfpcompression.fll and the new vfpconnection.fll, AppUpdate.exe is designed to allow Visual FoxPro developers to quickly and easily add update capabilities to their applications. Here's a couple of screen shots of AppUpdate runnning...

While I am including the source code for the AppUpdate project, it is not necessary to modify AppUpdate in order to configure it to update a particular application. AppUpdate gets its information from the appupdate.ini file that provides a myriad of sections and entries that will allow you to specify what application it is supposed to load, where to check for updates, how to load the application, what to display to the user, where to copy updates locally so that the same update only needs to be dowloaded once in a multi-user environment, when to display updates, what VFP code to execute once the update has been installed, etc. So, as a developer you really only need to modify the ini to suit and bundle AppUpdate with your VFP applications.

In The Download ...

In the download I am including a fully working example of AppUpdate along with the source. I've included a sampleapp.exe that is version 1.0 and I've placed a live update for it (version 2.0) on the SweetPotato Software server at this end so you'll be able to actually try AppUpdate out and see how it works straight out of the box. I've included copious comments in the appupdate.ini file that you'll want to review and a couple of ReadMe.txt files. Simply dowload the zip file below, extract it somewhere, read through the ini file and the included ReadMe.txt files and then run the included AppUpdate.exe. When you start wanting to create your own updates you can have a look at the ServerUpdate folder I've included in the download as that contains the files that are up on the SweetPotato Software server that are updating the sampleapp.exe provided in the download.

Let Me Know What You Think

If you give AppUpdate a try, I'd love to hear what you think of it. If you have any suggestions for enhancements or find any bugs feel free to leave a comment here and I'll respond.

Until next time… Visual FoxPro Rocks!

AppUpdate Project and Example Download (922 KB approx.)

Friday, February 15, 2008 10:47:31 AM (GMT Standard Time, UTC+00:00)  #    Comments [10]

 

Archive

<September 2010>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789