vbscript - Hide command window on batch file -



vbscript - Hide command window on batch file -

i'm running batch file starts telnet session extreme network switch, disables several ports, closes window. can show me how adjust code both windows hidden view? right i'm using lastly 3 lines vbs script alt+f4 window. works 9 of 10 times, fails close window.

thank you!

batch file

?batch file (named disable.bat ): :: open telnet window start telnet.exe 10.3.100.26 :: run script cscript disable_script.vbs

vb script

set object=wscript.createobject("wscript.shell") 'login switch object.sendkeys "admin{enter}" wscript.sleep 50 object.sendkeys "password{enter}" wscript.sleep 50 'logout object.sendkeys " enable ports 1-5{enter}" wscript.sleep 25 object.sendkeys "quit{enter}" wscript.sleep 50 object.sendkeys "n{enter}" wscript.sleep 50 'close telnet window object.appactivate "telnet" wscript.sleep 200 object.sendkeys "%{f4}"

i found this solution worked fine batchfile me. pop's half sec , disappears then. also, worked out time whenever used it.

batch-file vbscript

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -