mirror of
https://github.com/netchx/netch.git
synced 2026-03-30 19:09:48 +08:00
Netch.Global.NetchExecutable
This commit is contained in:
@@ -22,6 +22,8 @@ namespace Netch
|
||||
|
||||
public static readonly string NetchDir = Application.StartupPath;
|
||||
|
||||
public static readonly string NetchExecutable = Application.ExecutablePath;
|
||||
|
||||
/// <summary>
|
||||
/// 主窗体的静态实例
|
||||
/// </summary>
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Netch
|
||||
}
|
||||
|
||||
Logging.Info($"版本: {UpdateChecker.Owner}/{UpdateChecker.Repo}@{UpdateChecker.Version}");
|
||||
Task.Run(() => { Logging.Info($"主程序 SHA256: {Utils.Utils.SHA256CheckSum(Application.ExecutablePath)}"); });
|
||||
Task.Run(() => { Logging.Info($"主程序 SHA256: {Utils.Utils.SHA256CheckSum(Global.NetchExecutable)}"); });
|
||||
Task.Run(() =>
|
||||
{
|
||||
Logging.Info("启动单实例");
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Netch.Updater
|
||||
MoveDirectory(Path.Combine(extractPath, "Netch"), Global.NetchDir, true);
|
||||
|
||||
Global.Mutex.ReleaseMutex();
|
||||
Process.Start(Application.ExecutablePath);
|
||||
Process.Start(Global.NetchExecutable);
|
||||
Global.MainForm.Exit(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace Netch.Utils
|
||||
td.Principal.RunLevel = TaskRunLevel.Highest;
|
||||
|
||||
td.Triggers.Add(new LogonTrigger());
|
||||
td.Actions.Add(new ExecAction(Application.ExecutablePath));
|
||||
td.Actions.Add(new ExecAction(Global.NetchExecutable));
|
||||
|
||||
td.Settings.ExecutionTimeLimit = TimeSpan.Zero;
|
||||
td.Settings.DisallowStartIfOnBatteries = false;
|
||||
|
||||
Reference in New Issue
Block a user