C#自动升级程序

上传者: th199301 | 上传时间: 2020-01-30 03:11:36 | 文件大小: 377KB | 文件类型: zip
对C#不是很熟,擅长C语音,网上找的不能自己用,就按照自己需求改的,因为程序不大,所有就直接控制升级,不需要点击任何按钮。大致流程:主程序开机后初始化里面加载升级程序,升级程序读取本地的XML和从服务器下载的XML看是否需要升级,如果升级就下载高版本升级程序,然后关闭当前低版本程序,再打开高版本升级的程序,接在删除第版本程序文件,最好下载服务器的XML文档覆盖本地是的!升级程序已经写好备注,有点语法基础应该都可以成功!使用时需要吧升级程序的EXE和主程序EXE还有XML放在一个文件夹里面,XML文件需要修改你服务器存放的升级文件路径及程序名。 自己的主程序初始化里面添加这么一段: string str = System.Environment.CurrentDirectory + "\\" + "Check_SoftwareV1.1.exe";//获得当前运行程序的路径 try { Process.Start(str);//打开升级程序 } catch { MessageBox.Show("检查程序运行出错,请注意文件是否存在.", "错误");//错误处理 } 因为网上找了很多都不能直接用,所有写了这么详细一个教程,希望帮助大家!如果遇到问题欢迎回复询问,我也是个业余搞C#的,有错误也欢迎大家指出!

文件下载

资源详情

[{"title":"( 51 个子文件 377KB ) C#自动升级程序","children":[{"title":"C#升级程序源码","children":[{"title":"IniFiles.cs <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"UpdateList.xml <span style='color:#111;'> 481B </span>","children":null,"spread":false},{"title":"AutoUpdate.suo <span style='color:#111;'> 8.50KB </span>","children":null,"spread":false},{"title":"FrmUpdate.cs <span style='color:#111;'> 7.33KB </span>","children":null,"spread":false},{"title":"AutoUpdate.v11.suo <span style='color:#111;'> 52.00KB </span>","children":null,"spread":false},{"title":"AutoUpdate.csproj <span style='color:#111;'> 4.26KB </span>","children":null,"spread":false},{"title":"Backup","children":[{"title":"IniFiles.cs <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"FrmUpdate.cs <span style='color:#111;'> 18.59KB </span>","children":null,"spread":false},{"title":"AutoUpdate.v11.suo <span style='color:#111;'> 8.50KB </span>","children":null,"spread":false},{"title":"AutoUpdate.csproj <span style='color:#111;'> 5.32KB </span>","children":null,"spread":false},{"title":"AppUpdater.cs <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false},{"title":"XmlFiles.cs <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.82KB </span>","children":null,"spread":false},{"title":"AutoUpdate.sln <span style='color:#111;'> 905B </span>","children":null,"spread":false},{"title":"FrmUpdate.resx <span style='color:#111;'> 159.75KB </span>","children":null,"spread":false},{"title":"AutoUpdate.csproj.user <span style='color:#111;'> 1.76KB </span>","children":null,"spread":false},{"title":"App.ico <span style='color:#111;'> 24.62KB </span>","children":null,"spread":false}],"spread":false},{"title":"AppUpdater.cs <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false},{"title":"XmlFiles.cs <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.89KB </span>","children":null,"spread":false},{"title":"AutoUpdate.sln <span style='color:#111;'> 904B </span>","children":null,"spread":false},{"title":"UpgradeLog.htm <span style='color:#111;'> 25.74KB </span>","children":null,"spread":false},{"title":"Thumbs.db <span style='color:#111;'> 5.50KB </span>","children":null,"spread":false},{"title":"_UpgradeReport_Files","children":[{"title":"UpgradeReport_Error.png <span style='color:#111;'> 397B </span>","children":null,"spread":false},{"title":"UpgradeReport.xslt <span style='color:#111;'> 21.69KB </span>","children":null,"spread":false},{"title":"UpgradeReport_Information.png <span style='color:#111;'> 338B </span>","children":null,"spread":false},{"title":"UpgradeReport.css <span style='color:#111;'> 2.18KB </span>","children":null,"spread":false},{"title":"UpgradeReport_Warning.png <span style='color:#111;'> 292B </span>","children":null,"spread":false},{"title":"UpgradeReport_Success.png <span style='color:#111;'> 381B </span>","children":null,"spread":false}],"spread":true},{"title":"FrmUpdate.resx <span style='color:#111;'> 42.91KB </span>","children":null,"spread":false},{"title":"AutoUpdate.csproj.user <span style='color:#111;'> 1.77KB </span>","children":null,"spread":false},{"title":"App.ico <span style='color:#111;'> 24.62KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"Check_SoftwareV1.1.exe <span style='color:#111;'> 48.00KB </span>","children":null,"spread":false},{"title":"Check_SoftwareV1.1.pdb <span style='color:#111;'> 35.50KB </span>","children":null,"spread":false},{"title":"AutoUpdate.dll <span style='color:#111;'> 164.00KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"AutoUpdate.FrmUpdate.resources <span style='color:#111;'> 25.18KB </span>","children":null,"spread":false},{"title":"AutoUpdate.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.55KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 5.93KB </span>","children":null,"spread":false},{"title":"AutoUpdate.csprojResolveAssemblyReference.cache <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferences.cache <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false},{"title":"AutoUpdate.csproj.GenerateResource.Cache <span style='color:#111;'> 778B </span>","children":null,"spread":false},{"title":"AutoUpdate.projdata <span style='color:#111;'> 13.51KB </span>","children":null,"spread":false},{"title":"temp","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"UpgradeLog.XML <span style='color:#111;'> 6.83KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Debug","children":[{"title":"UpdateList.xml <span style='color:#111;'> 480B </span>","children":null,"spread":false},{"title":"Check_SoftwareV1.1.exe <span style='color:#111;'> 48.00KB </span>","children":null,"spread":false},{"title":"Check_SoftwareV1.1.pdb <span style='color:#111;'> 35.50KB </span>","children":null,"spread":false},{"title":"AutoUpdate.dll <span style='color:#111;'> 164.00KB </span>","children":null,"spread":false},{"title":"Check_SoftwareV1.1.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"AutoUpdate.pdb <span style='color:#111;'> 39.50KB </span>","children":null,"spread":false},{"title":"AutoUpdate.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"Check_SoftwareV1.1.vshost.exe <span style='color:#111;'> 20.96KB </span>","children":null,"spread":false}],"spread":false},{"title":"Release","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明