Create a Bat file ( Ex: openputty.bat)
Add below syntax in that file.
@echo on
"<C:\Program Files\PuTTY\putty.exe>" -ssh username@SERVERNAMEoriP -pw %1 22 -m command.txt
Password can pass as command line argument or can prove in the above command in place of %1
If you have multiple commands to execute in putty, You can add that commands in text file and pass as above. -m command.txt
Add below syntax in that file.
@echo on
"<C:\Program Files\PuTTY\putty.exe>" -ssh username@SERVERNAMEoriP -pw %1 22 -m command.txt
Password can pass as command line argument or can prove in the above command in place of %1
If you have multiple commands to execute in putty, You can add that commands in text file and pass as above. -m command.txt