mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-05 04:52:06 +03:00
Refactor ProcessStart RebootAsAdmin
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,9 @@ namespace ServiceLib.ViewModels
|
||||
|
||||
if (Utils.IsWindows())
|
||||
{
|
||||
service?.RebootAsAdmin(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
service?.Shutdown();
|
||||
ProcUtils.RebootAsAdmin(false);
|
||||
}
|
||||
service?.Shutdown();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user