Test.EIImageViewer
parent
9b54e02979
commit
d1a57c6e98
|
@ -15,10 +15,9 @@ try
|
||||||
//&& .\\IRaCIS_Vue_Web.bat
|
//&& .\\IRaCIS_Vue_Web.bat
|
||||||
|
|
||||||
//&& ./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))
|
using (var cmd = client.CreateCommand(command))
|
||||||
{
|
{
|
||||||
var output = cmd.Execute();
|
var output = cmd.Execute();
|
||||||
|
@ -27,21 +26,7 @@ try
|
||||||
Console.WriteLine(output);
|
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连接
|
// 断开SSH连接
|
||||||
|
|
Loading…
Reference in New Issue