How to modify PUTTY default settings from Command Line in Windows

On Putty's UI under Session tag, want to change the option to "Close windows on Exit" and Under Windows->Behavior want to uncheck "Warn before closing window" as a Default setting so that every time I launch putty it is always launched with the same option.

1 Answer

PuTTY does not have any command-line options to change its settings. But as it stores its settings to Windows registry, you can use reg command to modify it:

reg add HKCU\Software\SimonTatham\PuTTY\Sessions\Default%20Settings /v WarnOnClose /t REG_DWORD /d 0
reg add HKCU\Software\SimonTatham\PuTTY\Sessions\Default%20Settings /v CloseOnExit /t REG_DWORD /d 2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like