From 524d7fe186f20d8eb23f0e4429f4d4ea74b334b0 Mon Sep 17 00:00:00 2001 From: yi-ge Date: Mon, 2 Sep 2019 19:16:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=B8=E8=BD=BD=E6=97=B6=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=89=80=E6=9C=89node.js=E8=BF=9B=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/Program.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup/Program.cs b/setup/Program.cs index 3e1bc8c..f9ae207 100644 --- a/setup/Program.cs +++ b/setup/Program.cs @@ -112,8 +112,8 @@ namespace setup ll = pro.StandardOutput.ReadToEnd() + pro.StandardError.ReadToEnd(); //读取输出 - pro.WaitForExit(); //等待程序执行完退出进程 - pro.Close();//结束 + pro.WaitForExit(); //等待程序执行完退出进程 + pro.Close();//结束 return ll; } catch (Exception ex) @@ -334,8 +334,8 @@ SOFTWARE."); else { Console.WriteLine("What do you want to do?"); - Console.WriteLine("1) Install (I accept the MIT License.)"); - Console.WriteLine("2) Uninstall"); + Console.WriteLine("1) Install (I accept the MIT License)"); + Console.WriteLine("2) Uninstall(Will exit the Node.js process)"); Console.WriteLine("3) Exit"); Console.Write("#?"); cmd = Console.ReadLine(); @@ -398,6 +398,7 @@ SOFTWARE."); { Console.WriteLine(ExecuteOutCmd("C:\\WINDOWS\\dc-agent\\bin\\dc-agent.exe", "stop")); Console.WriteLine(ExecuteOutCmd("C:\\WINDOWS\\dc-agent\\bin\\dc-agent.exe", "remove")); + runCmd("taskkill /fi \"imagename eq node.exe\" /f"); Thread.Sleep(1500);