mirror of
https://github.com/denglihong2007/CRSim
synced 2026-08-08 02:25:35 +08:00
fix: 应用无法自动重启
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user