mirror of
https://github.com/bolucat/Archive.git
synced 2025-10-17 13:41:04 +08:00
Update On Sat Jan 4 19:31:20 CET 2025
This commit is contained in:
@@ -130,11 +130,6 @@ namespace ServiceLib.ViewModels
|
||||
DisplayOperationMsg(ResUI.LocalRestoreInvalidZipTips);
|
||||
return;
|
||||
}
|
||||
if (!Utils.UpgradeAppExists(out _))
|
||||
{
|
||||
DisplayOperationMsg(ResUI.UpgradeAppNotExistTip);
|
||||
return;
|
||||
}
|
||||
|
||||
//backup first
|
||||
var fileBackup = Utils.GetBackupPath(BackupFileName);
|
||||
@@ -150,12 +145,16 @@ namespace ServiceLib.ViewModels
|
||||
|
||||
if (Utils.IsWindows())
|
||||
{
|
||||
service?.RebootAsAdmin(false);
|
||||
ProcUtils.RebootAsAdmin(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
service?.Shutdown();
|
||||
if (Utils.UpgradeAppExists(out var upgradeFileName))
|
||||
{
|
||||
ProcUtils.ProcessStart(upgradeFileName, Global.RebootAs, Utils.StartupPath());
|
||||
}
|
||||
}
|
||||
service?.Shutdown();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user