Dim ftp1 As New FtpClient
ftp1.Host="XXXX"
ftp1.Account = "XXX"
ftp1.Password = "XXX"
If ftp1.Upload("\shengji\update.txt",ProjectPath & "update.txt") = True Then
If Vars("update") <> FileSys.ReadAllText(ProjectPath & "update.txt") Then
MessageBox.Show("服务器上版本时间为" & FileSys.ReadAllText(ProjectPath & "update.txt"))
If ftp1.Upload("\shengji\update2.zip",ProjectPath & "update2.zip") = True Then
Dim zip As New ZipFile
zip.Open( ProjectPath & "update2.zip")
zip.Extractall(ProjectPath )
zip.Close()
MessageBox.Show("更新完成")
Vars("update") = FileSys.ReadAllText(ProjectPath & "update.txt")
Syscmd.Project.Open(ProjectFile)
End If
Else
messagebox.show("当前版本为最新版本")
End If
End If
'If FileSys.FileExists(ProjectPath & "update2.zip") Then '如果指定的文件存在
'FileSys.DeleteFile(ProjectPath & "update2.zip",2,2) '则彻底删除之
'End If
'If FileSys.FileExists(ProjectPath & "update.txt") Then '如果指定的文件存在
'FileSys.DeleteFile(ProjectPath & "update.txt",2,2) '则彻底删除之
'End If
老师,你好,因自动升级有的电脑要出问题想做一个手动下载升级,现在这样子做没任何提示,也下载不起文件,哪里有错