# MAutoUpdate
## 配置说明
Server.xml
```xml
-
demo.exe//更新后启动的程序
Print//程序名称(暂时没用)
1.0.0.0//最小版本号(暂时没用)
2017/9/28 9:25:24//发布时间
http://localhost/WebApp/update/1.1.0.0.zip//下载地址
1.1.0.0//发布版本号
更新说明文件的链接地址信息,rtf的格式//更新界面提示信息
Increment//Cover表示覆盖更新,Increment表示增量更新
```
Local.xml
```xml
1.0.0.0//本地版本号
2016/9/28 9:25:24//最后更新时间
http://localhost/TestWeb/Server.xml//server.xml文件地址
```
## 使用方法
启动更新程序方法
```C#
[STAThread]
static void Main()
{
String path = AppDomain.CurrentDomain.BaseDirectory + "MAutoUpdate.exe";//程序路径
//同时启动自动更新程序
if (File.Exists(path))//判断是否存在更新程序
{
ProcessStartInfo processStartInfo = new ProcessStartInfo()
{
FileName = "MAutoUpdate.exe",
Arguments = " MAutoUpdate.Test 1"//参数信息,程序名称 0:弹窗更新 1:静默更新
};
Process proc = Process.Start(processStartInfo);
if (proc != null)
{
proc.WaitForExit();
}
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
```