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

Check for updates automatically

Status
Not open for further replies.
May 22, 2003
42
US
Hi

Does anyone know of a way to have an application check for an update every time it launches? I've tried ClickOnce with no success because of it's limitations, and don't understand how the Application Updater block works? Any help would be greatly appreciated.

Thanks in advance
 
You could write a web service that returns the version number. Then on application start you could call the web service method and see if it matches the current version number stored somewhere in your application. If it doesn't then display an update available message (or update it automatically, etc).

J
 
Thanks jshurst

Do you have an example of what the code would look like?
 
Not really, but a web method is just the same as a regular method except for the "webmethod" keyword.

So you could create a web service with a method in it that returns a one row dataset.

Like so...

Code:
<WebMethod()> _
Public Function GetVersion (ByVal versionNumber as String) as DataSet
Dim myDataSet as New DataSet

'  Then do you logic to get your version and build a dataset with whatever information you want in it

'Then return your dataset
Return myDataSet


End Function
Make a reference to a public web server that hosts your web service and check it on the page_load.

J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top