I have a situation where i have to execute a Batch script on Remote Windows Machine (MACH2) from my local machine (MACH1). I was able to do this from windows machine to Linux machine but not able to do this from windows machine to windows machine.
Because when i coonect to windows machine MACH1 to anothe windows machine MACH2 using telnet , it ask for a (y/n) from the user , which i'm not able to provide in script (written below )
[CODE=perl]
push(@INC,'E:\p erl\Net-Telnet-3.03\blib\lib\N et');
use Net::Telnet ();
$t = new Net::Telnet(
Timeout => 10,
Prompt => '/\$ $/',
);
$t->open("X.X.X.X" );
$t->login('"abc" , 'abc');
$cd = $t->cmd("cd ajay");
$comp = $t->cmd("ls");
print @lines;
[/CODE]
Because when i coonect to windows machine MACH1 to anothe windows machine MACH2 using telnet , it ask for a (y/n) from the user , which i'm not able to provide in script (written below )
[CODE=perl]
push(@INC,'E:\p erl\Net-Telnet-3.03\blib\lib\N et');
use Net::Telnet ();
$t = new Net::Telnet(
Timeout => 10,
Prompt => '/\$ $/',
);
$t->open("X.X.X.X" );
$t->login('"abc" , 'abc');
$cd = $t->cmd("cd ajay");
$comp = $t->cmd("ls");
print @lines;
[/CODE]
Comment