par181
par181

Reputation: 401

Hiding putty terminal while running in Batch script

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

putty.exe -ssh -2 [email protected] -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?

Upvotes: 2

Views: 7643

Answers (1)

anishsane
anishsane

Reputation: 20970

Not possible using batch, use vbscript:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "putty.exe -ssh -2 [email protected] -pw password -m command.cmd", 0
' 0 => hide

Upvotes: 4

Related Questions