VB Script is:
set oShell = CreateObject("WScript.Shell")
oShell.run"cmd.exe"
WScript.Sleep 100
oShell.SendKeys"telnet 101.127.9.1 -f \\101.127.9.10\c$\Stordata\RouterType.txt"
oShell.SendKeys("{Enter}")
WScript.Sleep 300
oShell.SendKeys"Password"
oShell.SendKeys("{Enter}")
WScript.Sleep 300
oShell.SendKeys"show inventory"
oShell.SendKeys("{Enter}")
WScript.Sleep 300
oShell.SendKeys"exit"
oShell.SendKeys("{Enter}")
oShell.SendKeys"exit"
oShell.SendKeys("{Enter}")
Set oShell = CreateObject("WScript.Shell")
Set oWmg = GetObject("winmgmts:")
strWndprs = "select * from Win32_Process where name='cmd.exe'"
Set objQResult = oWmg.Execquery(strWndprs)
For Each objProcess In objQResult
intReturn = objProcess.Terminate(1)
Next

New Topic/Question
Reply



MultiQuote




|