I need an auto updater , which will download off an URL or for example- "mysite.com/project.exe"
any help?
Source wold be nice too :c-grin:
VB Version: 2010
Thanks.
Auto Updater [Help]
Started by tmo, Dec 09 2010 08:12 PM
1 reply to this topic
#1
Posted 09 December 2010 - 08:12 PM
|
|
|
#2
Posted 09 December 2010 - 10:00 PM
i fixed.. i ended up using .xml on my server. ill post code too help someone else..
If getXMLValue(LabelX4.Text, "latestVersion") = "1.0.0.0" Then 'Change 1.0.0.0 to the assembly version of your app'
MsgBox("No Update Found", MsgBoxStyle.Information, "No Update")
Return
Else
If MessageBox.Show("Update found! Would you like to download?", "Update Found", MessageBoxButtons.YesNo) = DialogResult.Yes Then
Dim wc As New WebClient()
wc.DownloadFile("http://yoursite.com/app.exe", "Name of App")
End If
End If
Return
End Sub
Private Function getXMLValue(ByVal update As String, ByVal setting As String) As String
Dim xmlr As XmlReader = XmlReader.Create("http://yoursite.com/version.xml")
xmlr.Read()
xmlr.ReadToFollowing(setting)
Dim value As String = xmlr.ReadString()
xmlr.Close()
Return value
End Function


Sign In
Create Account

Back to top









