修复 net8 process启动问题

This commit is contained in:
ZouJin 2024-03-10 02:06:34 +08:00
parent 45c4aae1c9
commit 85dbfa9616

View File

@ -24,7 +24,15 @@ public partial class App : Application
} }
break; break;
case "launchsteam": case "launchsteam":
Process.Start("steam://rungameid/1920960"); var psi = new ProcessStartInfo
{
FileName = "cmd",
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = false,
RedirectStandardOutput = true,
Arguments = "/c start steam://rungameid/1920960"
};
Process.Start(psi);
break; break;
} }
Application.Current.Shutdown(); Application.Current.Shutdown();