• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

使用PB调用API自动更新(非FTP模式)(七、下载代码)

发布: 2007-7-02 11:08 | 作者: admin | 来源: | 查看: 34次 | 进入软件测试论坛讨论

领测软件测试网
七、下载代码

STRING GS_COPYSERVER1
STRING GS_COPYSERVER2
STRING GS_COPYSERVER3
string ls_path
string ls_mypath
long ll_count = 0

GS_COPYSERVER1    = ProfileString("autodown.ini","downpath","COPYSERVER1","")
GS_COPYSERVER2    = ProfileString("autodown.ini","downpath","COPYSERVER2","")
GS_COPYSERVER3    = ProfileString("autodown.ini","downpath","COPYSERVER3","")

st_ts.text = @#正在检查需要更新软件的数量...@#
ls_path = GS_COPYSERVER1
ll_count = f_connect_copycount(ls_path,lb_files1,lb_files2,lb_files3)
if ll_count = -1 then
 ls_path = GS_COPYSERVER2
 ll_count = f_connect_copycount(ls_path,lb_files1,lb_files2,lb_files3)
 if ll_count = -1 then
  ls_path = GS_COPYSERVER3
  ll_count = f_connect_copycount(ls_path,lb_files1,lb_files2,lb_files3)
  if ll_count = -1 then
   st_ts.text = @#正在检查是否需要更新软件版本...@#
   ls_path = f_connect_copyserver()
   if ls_path = @#@# then
    messagebox(@#连接错误!@#,@#无法连接服务器!软件不能运行!@#,stopsign!)
    //close(this)
    return
   end if
  end if
 end if
end if

//messagebox(@#@#,ls_path)ls_path<> @#@#
if ll_count = -1 then
 st_ts.text = @#正在检查需要更新软件的数量...@#
 ll_count = f_connect_copycount(ls_path,lb_files1,lb_files2,lb_files3)
end if
if ll_count = -1 then
 messagebox(@#连接错误!@#,@#无法连接服务器!软件不能运行!@#,stopsign!)
 close(this)
 return
end if
if ll_count = 0 then
 st_ts.text = @#正在启动主程序...@#
 
else
 st_ts.text = @#正在更新软件版本...@#
 choose case f_connect_copyfile(ls_path,hpb_1,ll_count,lb_files1,lb_files2,lb_files3)
  case 1
   st_ts.text = @#正在启动主程序...@#
   
  case 2 //启动参数不同,以便赋值更新程序
   st_ts.text = @#正在启动主程序...@#
   
 end choose
end if
string ls_file
ls_file = gs_application_path + @#\xxxxx.exe qqaazzwwss@#
run(ls_file)
//close(this)

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网