Hi Philip,
I used these commented lines just to show that I've tried all these options, but, none of them is working :(. For you, I've copied lines of code that is being executed. Please see below code-
use Net::Telnet;
BEGIN { $|=1 }
$user = "administrator";
$pass = 'pass';
$telnet = new Net::Telnet ( Timeout=>20, Errmode=>'die', Prompt => '/[
+%#>] ?$/', Dump_Log=>"dumplogs.txt", Input_log=>"inputlogs.txt", O
+utput_log=>"outputlogs.txt");
$telnet->open('xx.xx.xx.xx');
$telnet->login(Name=>$user, Password=>$pass, Prompt => '/[%#>:] ?$/');
$command = qq(msiexec \/qn \/i \\\\10.210.156.150\\SEP_Builds\\Jaguar\
+\Integration\\940\\DVD-SEP-EE\\SEPx64\\Sep64.msi \/norestart RUNLIVEU
+PDATE=0 \/l\*v C:\\Compatibility_Automation_Temp\\SepClientInstallLog
+.txt);
print "command is: [$command]\n";
@output = $telnet->cmd(String=>$command);
print "output is:\n@output\n";
exit;
The output of this command seen from the "inputlogs.txt" is mentioned below-
Welcome to Microsoft Telnet Service
login: administrator
password:
*===============================================================
Microsoft Telnet Server.
*===============================================================
C:\Users\Administrator>msiexec /qn /i \\10.210.156.150\SEP_Builds\Jagu
+ar\Integration\940\DVD-SEP-EE\SEPx64\Sep64.msi /norestart RUNLIVEUPDA
+TE=0 /l*v C:\Compatibility_Automation_Temp\SepClientInstallLog.txt
C:\Users\Administrator>
Now, if I copy and paste the same command I see in inputlogs.txt file, this command works well on remote mahcine. but using this script, it doesn't. Please help me with this.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.