From 85dbfa96164061db91374e54a78653f820d03e76 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Sun, 10 Mar 2024 02:06:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20net8=20process=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet.Solution/App.xaml.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/VPet.Solution/App.xaml.cs b/VPet.Solution/App.xaml.cs index 8e9780c..8361929 100644 --- a/VPet.Solution/App.xaml.cs +++ b/VPet.Solution/App.xaml.cs @@ -24,7 +24,15 @@ public partial class App : Application } break; 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; } Application.Current.Shutdown();