Hello,
I use this code to download a new version of my program but what i was wondering
is it possible to download the new version and delete the older version once the new
one has been downloaded this is the code that i use?.
I use this code to download a new version of my program but what i was wondering
is it possible to download the new version and delete the older version once the new
one has been downloaded this is the code that i use?.
code Code:
Public Sub CheckForUpdates() Dim file As String = Application.StartupPath & "" Dim MyVer As String = My.Application.Info.Version.ToString If My.Computer.FileSystem.FileExists(file) Then My.Computer.FileSystem.DeleteFile(file) End If My.Computer.Network.DownloadFile("", file) Dim LastVer As String = My.Computer.FileSystem.ReadAllText(file) If Not MyVer = LastVer Then MsgBox("There is an update available") My.Computer.Network.DownloadFile("", "") Else 'MsgBox("Your up to date") End If End Sub