How to modify PUTTY default settings from Command Line in Windows
By Daniel Rodriguez •
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