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", Output_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 RUNLIVEUPDATE=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; #### Welcome to Microsoft Telnet Service login: administrator password: *=============================================================== Microsoft Telnet Server. *=============================================================== C:\Users\Administrator>msiexec /qn /i \\10.210.156.150\SEP_Builds\Jaguar\Integration\940\DVD-SEP-EE\SEPx64\Sep64.msi /norestart RUNLIVEUPDATE=0 /l*v C:\Compatibility_Automation_Temp\SepClientInstallLog.txt C:\Users\Administrator>