2
1
I was created a .bat
file to run PuTTY and it successfully runs. The problem now is, the command line I was key in were not executed, any solution for this?
My .bat
command is:
putty -telnet -P 15555 test-PC -m C:\Users\tslai\Desktop\commands.txt
I'm connecting using Telnet, and I have a specific port number, which is 15555, the server name's is test-PC. commands.txt
is the arguments that I make.
In commands.txt
: only have a arguments, and it was tested can work properly if running directly by using command prompt.
You are welcome. Though on SuperUser we thank by accepting and/or upvoting the answer.
– Martin Prikryl – 2015-05-15T06:29:25.133I were tries with plink.exe, but it won't run the arguments i pass thru. How about run Putty.exe and after that pass an arguments into putty command box via only single batch file, do you know how to do that? – laits89 – 2015-05-15T09:08:22.010
You can to that only by simulating mouse-clicks. And that's a very unreliable method. – Martin Prikryl – 2015-05-15T09:09:26.640
What does the Plink do when you run it with redirected input? – Martin Prikryl – 2015-05-15T09:10:15.163
only run Putty.exe, but the arguments was ignored(didn't executed). – laits89 – 2015-05-15T09:49:39.457
Plink does not run PuTTY. Did you replace the
putty.exe
withplink.exe
in your command-line? – Martin Prikryl – 2015-05-15T09:51:21.060When i launched the plink.bat, the machine i connected to was stopped working and force closed the application. – laits89 – 2015-06-03T09:52:06.260
What is
plink.bat
? – Martin Prikryl – 2015-06-03T10:01:08.733sorry, plink.bat is only the bat name, the contain inside is
plink.exe -telnet -P 15555 test-PC < C:\Users\tslai\Desktop\commands.txt – laits89 – 2015-06-03T10:14:58.720