Dim updatepath As String
updatepath ="http://www1.mingdaltd.com/download"
RemoteUpdate=True
Network.DownloadFile(updatepath & "/update.txt",ProjectPath &"update.txt")
If Vars("updatedate") <> FileSys.ReadAllText(ProjectPath & "update.txt") Then
MessageBox.Show("服务器上版本时间为" & FileSys.ReadAllText(ProjectPath & "update.txt"))
Network .DownloadFile(updatepath & "/update.zip",ProjectPath &"update.zip" ,"","",True,60000,True)
Dim zip As New ZipFile
zip.Open( ProjectPath & "update.zip")
zip.Extractall(ProjectPath )
zip.Close()
MessageBox.Show("更新完成")
Vars("updatedate") = FileSys.ReadAllText(ProjectPath & "update.txt")
Syscmd.Project.Open(ProjectFile)
End If
If FileSys.FileExists(ProjectPath & "update.zip") Then '如果指定的文件存在
FileSys.DeleteFile(ProjectPath & "update.zip",2,2) '则彻底删除之
End If
If FileSys.FileExists(ProjectPath & "update.txt") Then '如果指定的文件存在
FileSys.DeleteFile(ProjectPath & "update.txt",2,2) '则彻底删除之
End If