以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  做的项目远程升级,出现Central dir not found。怎么解决  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=90233)

--  作者:dwang32
--  发布时间:2016/9/8 8:59:00
--  做的项目远程升级,出现Central dir not found。怎么解决
做的项目远程升级,出现Central dir not found。怎么解决

--  作者:有点蓝
--  发布时间:2016/9/8 9:17:00
--  
1、客户端不用安装到系统敏感目录
2、用“可执行文件.exe”启动程序
3、升级代码所在事件afteropenproject完整代码贴出看看

--  作者:dwang32
--  发布时间:2016/9/8 9:56:00
--  

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


--  作者:有点蓝
--  发布时间:2016/9/8 10:31:00
--  
测试是压缩包update.zip损坏,无法解压