run prompt command with multiple parts
Hi Folks
At a last attempt to integrate some SSH functionality I'd like to be able to run the prompt command
Code:
echo myString | C:\plink.exe testProfile -l userName
now I can get the later part ok with:
vb Code:
System.Diagnostics.Process.Start("echo 5| c:\lantronix\plink.exe", "test2 -l admin")
but how can I put the echo myString part?
Doesn't matter if its ugly, its just to automate test so we can easily change the values of myString
Cheers
Re: run prompt command with multiple parts
Have you tried using cmd.exe as the program and everything else is the argument?
Code:
System.Diagnostics.Process.Start("cmd.exe", "echo 5| c:\lantronix\plink.exe test2 -l admin")
You may need to provide the full path to cmd.exe, i.e. "c:\windows\system32\cmd.exe"