2

I am running my shell script connecting to remote server through putty, in a batch script as:

putty.exe -ssh -2 user@sever.com -pw password -m command.cmd

where, command.cmd contains

cd /path/to/the/script
./name.ksh

It is running 100% correct, as I needed.But here, the putty terminal is appearing while the batch script is running, which I donot want.

Is there any way to hide the putty terminal?

4

1 回答 1

4

无法使用批处理,请使用 vbscript:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "putty.exe -ssh -2 user@sever.com -pw password -m command.cmd", 0
' 0 => hide
于 2012-11-17T04:36:15.357 回答