在本地计算机中,包含了一个Update.xml,当程序启动的时候,会加载这个XML,然后回加载IIS服务器上的version.xml,然后把它们比较,如果本地的xml中指定的版本比服务器上的版本底的话,就从服务器上自动下载更新的文件,然后启动它。。这个是升级程序的类
using System;
using System.Xml;
namespace InfoLibraryManage
{
/// <summary>
/// Update 用于程序升级信息库的管理
/// </summary>
public class Update
{
private string strXMLFile = "";
private string strServerAddress = "";
private string ListFileName = "";
private string DownloadFileName = "";
private string strListFile = "";
private string strDownloadFile = "";
private string AppStartPath = "";
private string RemoteListFile = "";
private string RemoteDownFile = "";
private string RemoteAddress = "";
int nLocalMainVersion = -1;
int nLocalSecondVersion = -1;
int nRemoteMainVersion