也可以把updata.txt放一个到项目目录里,然后下载升级地址里的updata.txt获取版本号进行比对。大概
If FileSys.FileExists(projectpath & "update.txt") Then
Dim s As string = FileSys.ReadAllText(projectpath & "update.txt")
Network.DownloadFile("http://www.abc.com/download/update.txt", projectpath & "updatenew.txt")
If FileSys.FileExists(projectpath & "updatenew.txt") Then
Dim s2 As string = FileSys.ReadAllText(projectpath & "updatenew.txt")
if s <> s2 then
Messagebox.Show("需要升级!","提示")
else
Messagebox.Show("不需要升级!","提示")
endif
Else
Messagebox.Show("不需要升级!","提示")
End If
Else
Messagebox.Show("不需要升级!","提示")
End If