Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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.


In reply to Re^2: Need to Execute msiexec using Net::Telnet by tarunmudgal4u
in thread Need to Execute msiexec using Net::Telnet by tarunmudgal4u

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-24 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found