public static void Upgrade() { string updateFolder = AppDomain.CurrentDomain.BaseDirectory + Common.APPLICATION_ID; FileAdapter.EnsurePath(updateFolder); FileAdapter.Copy(Updater.AppName, updateFolder + @"\" + Updater.AppName, true); foreach (var file in Updater.DepandenceFiles) { FileAdapter.Copy(file, AppDomain.CurrentDomain.BaseDirectory + Common.APPLICATION_ID + @"\" + file, true); } string updateEndPoint = INIAdapter.ReadValue(Common.CFG_SECTION_WEB, Common.CFG_KEY_UPDATE_END_POINT, Common.CFG_FILE_PATH); string args = String.Format("-n {0} -v {1} -c {2}", AppAdapter.GetName(), VersionAdapter.GetPureVersion(VersionType.ASSEMBLY), updateEndPoint + "/" + Common.APPLICATION_ID); System.Diagnostics.Process.Start(updateFolder + @"\" + Updater.AppName, args); }