I'm trying to automate PuTTY using batch file. I am able to run serial session but I need to set up two additional things:

  • Terminal -> Local echo: Force on;
  • Terminal -> Local line editing: Force on

I have no idea what command would allow me to do that.


There's no command-line switch for that, if that's what you ask for.

All you can do is to configure a "saved session" and open that from your batch file.

You can, of course, create a temporary "saved session" from the batch file.

These questions show how:

  • Thanks for an answer Martin. is there a way to automate saved session configuration, where I set the echo and line editing by command and then open that session? – Michal Mar 14 '18 at 10:06
  • Yes, that's what my answer shows, isn't it? Do want to know what specific registry entries to set? Just save the settings in PuTTY GUI and check what changes in registry. – Martin Prikryl Mar 14 '18 at 10:43
  • got it. thanks I have one more issue: putty.exe -load asic -m commands.txt it doesn't input content of commands.txt to putty unfortunately. I saw a different topic on that but proposed solutions don't work either – Michal Mar 14 '18 at 13:08
  • And indeed the -m does not work with serial connection, only with SSH. For solution, see stackoverflow.com/q/30826002/850848 – Martin Prikryl Mar 14 '18 at 13:13
  • Thanks again Marin. It seems kinda working. How would I insert more than one command (commands differ in length and should be sent by pressing ENTER) – Michal Mar 14 '18 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.