Script Batch > telnet.bat

Titretelnet.bat
Postée le20-06-2011
Affichée1849
Mini-lien
Description

script

EtatContient des erreurs. Contient des erreurs.
Code d'insertion
Options
Mettre la source en plein ecran  Selectionner la source  Twitter Facebook Google Plus Email
Téléchargement Telecharger en format txt  Telecharger en format pdf
Plein ecran

@set tgateboxip=172.16.18.207
@set tgatepassword=rcs
@set tgatecommand1=en
@set tgatecommand2=show run
::@set tgatecommand3=cd /app/mfgpro/data/trng/intf/ex/BILLY
::@set tgatecommand4=cp -p *.* /app/mfgpro/data/trng/intf/ex/BILLY/arc
@set tgatecommand5=exit 

REM --------- CONNEXION ------------------------
@start telnet.exe %tgateboxip% 
@echo set sh=WScript.CreateObject("WScript.Shell")>>telnet.vbs 
@echo WScript.Sleep 500>>telnet.vbs 
@echo sh.SendKeys "%tgatepassword%">>$tgateboxip.vbs 
@echo WScript.Sleep 500>>telnet.vbs 
@echo sh.SendKeys "%tgatecommand1%">>telnet.vbs 
@echo WScript.Sleep 500>>telnet.vbs 
@echo sh.SendKeys "%tgatepassword%">>telnet.vbs 

REM --------- TRAITEMENT -----------------
@echo sh.SendKeys "%tgatecommand2%">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs 


REM --------- EXIT ------------------------
@echo sh.SendKeys "%tgatecommand6%">>telnet.vbs 
@echo WScript.Sleep 500>>telnet.vbs 
@cscript //nologo telnet.vbs del telnet.vbs