Sep 23, 2015 04:47 PM
(This post was last modified: Sep 24, 2015 06:20 AM by iRuSTecH.)
Hello guys 😉🤗
I will share one code that checks for updates and one for program downloading, if a new version found.
( WARNING : This Code Works Under Visual Studio 2015. Leave A Reply If You Have An Error )
Check For Updates CODE :
Downloader CODE :
About the link :
Im using textuploader .com to upload a text with the version and direct download link.
So simply is going like textuploader .com/blabla/raw
For direct download link im using Ozibox.
About the code :
If you have a check for updates program then you can just put the download code after the 'MsgBoxResult.Yes Then' of the check for updates code.
Make sure you have the first program close or add a proc kill code.
I will share one code that checks for updates and one for program downloading, if a new version found.
( WARNING : This Code Works Under Visual Studio 2015. Leave A Reply If You Have An Error )
Check For Updates CODE :
Code
'' 'Paste this code in Check For Updates button'
Dim request As Net.HttpWebRequest = Net.WebRequest.Create("http ://www .link.com")
Dim response As Net.HttpWebResponse = request.GetResponse()
Dim rs As StreamReader = New StreamReader(response.GetResponseStream())
Dim nversion As String = rs.ReadToEnd()
Dim cversion As String = " Application Version "
If nversion.Contains(cversion) Then
MsgBox("No Updates Found", MsgBoxStyle.Information, "Check For Updates")
Else
If MsgBox("Newer Version Found. Download Now?", MsgBoxStyle.YesNo + MsgBoxStyle.Information, "Check For Updates") = MsgBoxResult.Yes Then
Process.Start(Application.StartupPath + "\The program name that will download the updates.exe")
End
Else
End If
End IfCode
'' 'Paste this in the top of the source code'
Imports System.ComponentModel
Imports System.Net
'Paste this in the download button or in form load'
Dim request As HttpWebRequest =
WebRequest.Create(" the download link " 'make sure its direct download link')
Dim response As HttpWebResponse = request.GetResponse()
Dim sr As IO.StreamReader = New IO.StreamReader(response.GetResponseStream())
Dim downloadfrom As String = sr.ReadToEnd()
Try
download = New WebClient
download.DownloadFileAsync(New Uri(downloadfrom), Application.StartupPath + "\ The program name .exe")
Catch ex As Exception
MsgBox("Error ! " + vbNewLine + ex.Message, MsgBoxStyle.Critical, "Error")
End
End TryAbout the link :
Im using textuploader .com to upload a text with the version and direct download link.
So simply is going like textuploader .com/blabla/raw
For direct download link im using Ozibox.
About the code :
If you have a check for updates program then you can just put the download code after the 'MsgBoxResult.Yes Then' of the check for updates code.
Make sure you have the first program close or add a proc kill code.
Yeah 😁 Greetings from MadnessForCrack™



