首 页       用户登录  |  用户注册
设为首页
加入收藏
联系我们
按字母检索 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
按声母检索 A B C D E F G H J K L M N O P Q R S T W X Y Z 数字 符号
您的位置: 5VAR论文频道论文中心计算机论文计算机应用
   利用Web Services实现软件自动升级      ★★★ 【字体: 】  
利用Web Services实现软件自动升级
收集整理:佚名    来源:本站整理  时间:2009-01-10 11:55:47   点击数:[]    

tem.EventArgs e)
       {
              System.Diagnostics.Process[] ps = System.Diagnostics.Process.GetProcesses();
              foreach(System.Diagnostics.Process p in ps)
              {
                     //MessageBox.Show(p.ProcessName);
                     if(p.ProcessName.ToLower()=="customerapplication")
                     {
                            p.Kill();
                            break;
                     }
              }
              XmlDocument doc = new XmlDocument();
              doc.Load(Application.StartupPath + @"\update.xml");
              XmlElement root = doc.DocumentElement;
              XmlNode updateNode = root.SelectSingleNode("filelist");
              string path = updateNode.Attributes["sourcepath"].Value;
              int count = int.Parse(updateNode.Attributes["count"].Value);
              for(int i=0;i= updateNode.ChildNodes[i];
                     string fileName = itemNode.Attributes["name"].Value;
                     FileInfo fi = new FileInfo(fileName);
                     fi.Delete();
                     //File.Delete(Application.StartupPath + @"\" + fileName);
                     this.label1.Text = "正在更新:" + fileName + " (" + itemNode.Attributes["size"].Value + ") ...";
                FileStream fs = File.Open(fileName,FileMode.Create,FileAccess.Write);    fs.Write(System.Convert.FromBase64String(itemNode.SelectSingleNode("value").InnerText),0,int.Parse(itemNode.Attributes["size"].Value));
               fs.Close();
            }
              label1.Text = "更新完成";
              File.Delete(Application.StartupPath + @"\update.xml");
              label1.Text = "正在重新启动应用程序...";
              System.Diagnostics.Process.Start("CustomerApplication.exe");
              Close();
              Application.Exit();
       }
这里为了简单起见,没有使用异步方法,当然使用异步方法能更好的避免并发调用产生的冲突,这个需要读者自己去添加。
4 结束语
借助Web Services实现软件的自动升级,不仅设计简单,实现起来也很容易,取得了良好的效应,大大减轻了维护的工作量。本方案具有较好的参考价值。
参考文献
[1] 杨继家,张丽静,张晓蕾.面向C/S模式下的客户端软件自动升级的实现[J].微计算机应用,2005(5),290-293
YANG Ji-jia,ZHANG Li-jing,ZHANG Xiao-lei.An realization of Automatically updating orienting to C/S Application System[J].Microcomputer Applications,2005(5),290-293
[2] 何航校,蒋兆远.一种改进的通用客户端自动升级模型及实现[J].兰州交通大学学报(自然科学版),2005(8),110-113
    HE Hang-xiao,JIANG Zhao-yuan.An Improved Universal Auto Upgrade Model of Client and its Realization.Journal of Lanzhou Jiaotong University (Natural Sciences),2005(8),110-113
[3] 乌云高娃.动态升级在MIS 系统中的实现与应用[J].计算机工程与设计,2005(10),2854-2856
WUYUN Gao-wa.Implementation and application of dynamic upgrade technique in MIS[J].Computer Engineering and Design,2005(10),2854-2856
[4] 叶利华,陶宏才,梁田.基于COM的软件在线升级技术[J].成都信息工程学院学报,2005(2),73-75
   YE Li-hua,TAO Hong-cai,LIANG Tian.Software live updating technology based on COM[J].Journal of Chengdu University of Information Technology,2005(2),73-75
[5] 余颖,董旭源,高宏.C/S模式管理信息系统实现自动升级和维护的方法[J].佳木斯大学学报(自然科学版),2005(4),200-202
    YU Ying,DONG Xu-yuan,GAO Hong.Methods to Perform Upgrade and Maintenance in C/S Mode Management Information System[J],2005(4),200-202
Implementation of software auto-update by Web Services
CAO Qing-Xu
(QianDongNan Vocational &Technical Institute,Kaili,Guizhou,556000)
Abstract: The software maintaining and updating is an important section in the software life cycle. This paper makes use of the technology of Web Services、C# and XML Language, to resolve the poor efficiency of client’s updating in old C/S application system. The automatically updating program can detect the new version, download the updating file, automatically backup and rollback. It makes the software updating by the client automatically, and it is practical.
Keywords: C#;Web Services;XML;software auto-update 

778论文在线 www.qiqi8.com/

上一页  [1] [2] 


Tags:


文章转载请注明来源于:5VAR论文频道 http://paper.5var.com。本站内容整理自互联网,如有问题或合作请Email至:support@5var.com
或联系QQ37750965
提供人:佚名
  • 上一篇文章:探索计算机VB程序设计教学方法

  • 下一篇文章:物资管理信息系统开发
  • 返回上一页】【打 印】【关闭窗口
    中查找“利用Web Services实现软件自动升级”更多相关内容 5VAR论文频道
    中查找“利用Web Services实现软件自动升级”更多相关内容 5VAR论文频道
    最新热点 最新推荐 相关新闻
  • ››Delphi 5 数据库应用中ODBC数据源的...
  • ››用Visual Basic 6.0实现自动化测试...
  • ››用JAVA制作ICQ
  • ››在IIS 4.0上配置虚拟主机实现虚拟I...
  • ››利用VB开发CAI课件
  • ››基于GP算法的知识发现系统
  • ››基于Client/Server 的课件系统的设...
  • ››WWW对大量数据查询的一种实现
  • ››基于PHP的Web数据库访问
  • ››Developer/2000中的Forms参数及应用...
  • ››利用Web Services实现软件自动升级...
  •   文章-网友评论:(评论内容只代表网友观点,与本站立场无关!)
    关于本站 - 网站帮助 - 广告合作 - 下载声明 - 网站地图
    Copyright © 2006-2033 5Var.Com. All Rights Reserved .