fix: 应用无法自动重启

This commit is contained in:
denglihong2007
2025-09-13 00:28:41 +08:00
parent 810105b80d
commit 69afa48435

View File

@@ -100,9 +100,10 @@ public partial class PluginManagementPageViewModel : ObservableObject
public static void Restart()
{
string exePath = Environment.ProcessPath;
Process.Start(new ProcessStartInfo(exePath)
Process.Start(new ProcessStartInfo("cmd", $"/C timeout /t 0.75 & start \"\" \"{exePath}\"")
{
UseShellExecute = true
CreateNoWindow = true,
UseShellExecute = false
});
Application.Current.Exit();
}