Test.EIImageViewer
hang 2023-04-27 13:31:03 +08:00
parent 9b54e02979
commit d1a57c6e98
1 changed files with 2 additions and 17 deletions

View File

@ -15,10 +15,9 @@ try
//&& .\\IRaCIS_Vue_Web.bat
//&& ./IRaCIS_Vue_Web.bat
string command = "cd C:\\Users\\Administrator\\VueSourceCode\\ ";
string command = "cd C:\\Users\\Administrator\\bat && .\\IRaCIS_Vue_Web.bat ";
//// 切换到指定目录
//var commandCd = client.CreateCommand("cd C:\\Users\\Administrator\\bat");
using (var cmd = client.CreateCommand(command))
{
var output = cmd.Execute();
@ -27,21 +26,7 @@ try
Console.WriteLine(output);
}
var processInfo = new ProcessStartInfo("npm", "i")
{
CreateNoWindow = false,
UseShellExecute = false,
RedirectStandardOutput = true
};
using (var process = new Process())
{
process.StartInfo = processInfo;
process.OutputDataReceived += (sender, args) => Console.WriteLine(args.Data);
process.Start();
process.BeginOutputReadLine();
process.WaitForExit();
}
// 断开SSH连接