- @echo off
- echo ===============================
- echo Production server
- echo ===============================
- echo please input "y" to continue......
- set /p input=
- if "%input%"=="y" (
- "putty.exe" -pw serverPassword -m script.txt username@IP
- echo reboot server command executed.
- ) else echo Does not execute any command
- pause
- #该片段来自于http://www.codesnippet.cn/detail/110220148689.html
来源: http://www.codesnippet.cn/detail/110220148689.html