Apr 10, 2010 11:05 AM
(This post was last modified: Apr 10, 2010 11:37 AM by The-One.)
Okey, im posting this simple updating system I made.
What are we going to use?
Ok, in your program put:
Under Class Form1
Form1.Load
Next, we need a host for our file, which we use, to upload the .exe and see if theres a update.
Upload a text file to your host with ONLY 2.0 in it.
Now lets check for a update.
Form1.Load // Buton1
Ok, so now it checks if there is a update, you will need to update the text file every time you upload a new update.
Now lets make it download
Button2
I fully wrote this myself, enjoy.
What are we going to use?
- Webclient
- Label
- If/Else
- DownloadFile
Ok, in your program put:
Under Class Form1
Code
Dim Version As String = "1.0"Form1.Load
Code
Label1.text = VersionNext, we need a host for our file, which we use, to upload the .exe and see if theres a update.
Upload a text file to your host with ONLY 2.0 in it.
Now lets check for a update.
Form1.Load // Buton1
Code
Dim NewVersion As String
Dim WebC As New Webclient
Try
NewVersion = WebC.DownloadString("<linktoversion.txt>")
Catch ex As Exception
NewVersion = WebC.DownloadString("<linktoversion.txt>") ' Try again most of the times, if it doesnt connect the first time, it will now.
End Try
If NewVersion = Version Then
Label2.text = "No New Updates"
else
Label2.text = "New Update!"
End IfOk, so now it checks if there is a update, you will need to update the text file every time you upload a new update.
Now lets make it download
Button2
Code
Dim Webc As New Webclient
If Label2.text = "New Update!" Then
Webc.DownloadFile("<linktournewfile>", "<nameuwantittoget>")
Label2.text = "No New Updates"
End IfI fully wrote this myself, enjoy.
FR1908


