boat73 has asked for the wisdom of the Perl Monks concerning the following question:
use Net::SSH::W32Perl; $host = "$ARGV[0]"; $user = "$ARGV[1]"; $pwd = "$ARGV[2]"; $cmd = 'setenv DISPLAY 10.1.42.151:0.0; xterm &'; &startexceed; print "EXCEED STARTED\n"; my $ssh = new Net::SSH::W32Perl($host, protocol => '2', debug => + 1); $ssh->login($user, $pwd); my ($out, $err, $exit) = $ssh->cmd($cmd); print "OUT => $out\n\n"; print "ERR => $err\n\n"; print "EXIT => $exit\n\n"; sub startexceed{ $exceed = "C:\\Program Files\\Hummingbird\\Connectivity\\9.00\\Exc +eed\\exceed.exe"; use Win32::Process; $Result = Win32::Process::Create($ProcessObj, "$exceed", "$exceed -m passive", 0, NORMAL_PRIORITY_CLASS, ".")|| die "\nCould not create exceed\.exe\n"; $ProcessObj->Wait(10); $ProcessObj->GetExitCode($exitcode); unless($exitcode == "259"){ die "exceed exited with a return code of $exitcode\n"; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I run a background command via Net::SSH::W32Perl
by samizdat (Vicar) on Nov 14, 2005 at 17:17 UTC | |
by boat73 (Scribe) on Nov 14, 2005 at 19:46 UTC | |
by samizdat (Vicar) on Nov 14, 2005 at 20:31 UTC | |
Re: How do I run a background command via Net::SSH::W32Perl
by JamesNC (Chaplain) on Nov 14, 2005 at 16:13 UTC | |
by boat73 (Scribe) on Nov 14, 2005 at 16:18 UTC | |
by marto (Cardinal) on Nov 14, 2005 at 16:24 UTC | |
by JamesNC (Chaplain) on Nov 14, 2005 at 19:00 UTC |