View Single Post
Old Feb 26th, 2008, 11:30 PM   #3
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,034
Rep Power: 5 lectricpharaoh will become famous soon enough
Re: online updater program...

The basic idea here is to have your software periodically check for updates. You can do this by having it be aware of its own version number, or you could instead track the most recent time an update had been applied. You could even track which updates had been applied, in the event that you have a component-based software suite, with each update being discretionary rather than mandatory.

Once your code is aware of its own version, it can connect to a site (you'll need to learn how to do this) to check that it's up-to-date, and take appropriate action if not. This appropriate action might be prompting the user to download and install an update, or it might silently update itself (be careful if you choose the latter- many users are bothered by this sort of thing).

With all that, there are two main methods to handle the updating. The first is to check when the software starts up. This is the simplest method, especially if the software is regularly started and stopped. The second is to follow Ancient Dragon's suggestion of using a Windows service, though I think it's probably overkill for your purposes. A service-based updater is more suitable if you have critical software that needs to check at fixed intervals, whether or not the user restarts the software. Either way, you don't need C or C++ for a Windows service. You can also use any .NET language, like C#, to do it much easier. Here is one of many results I found on MSDN; one of the sample projects is a Windows service in C#. Of course, what language you pick really will depend on what you're comfortable with.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote