From 76ea2f7c85372e73411abf973e68a093f6c528cc Mon Sep 17 00:00:00 2001 From: HikariXu <45059926+HikariXu@users.noreply.github.com> Date: Wed, 8 Dec 2021 11:30:47 +0800 Subject: [PATCH] fix run taskmgr.exe --- RunCat/Program.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/RunCat/Program.cs b/RunCat/Program.cs index 832b67fe..fe8a64a7 100644 --- a/RunCat/Program.cs +++ b/RunCat/Program.cs @@ -299,7 +299,14 @@ private void StartObserveCPU() private void HandleDoubleClick(object Sender, EventArgs e) { - System.Diagnostics.Process.Start("taskmgr.exe"); + var startInfo = new ProcessStartInfo + { + FileName = "powershell", + UseShellExecute = false, + Arguments = " -c Start-Process taskmgr.exe", + CreateNoWindow = true, + }; + Process.Start(startInfo); } }