2012-01-25 2 views
-2

이 VBSCRIPT 코드는 800A0400 오류를 발생시킵니다. 이견있는 사람?VBscript/Wscript로 텔넷 재설정

<job> 
<script language="VBScript"> 
Option Explicit 
On Error Resume Next 
Dim WshShell 
set WshShell=CreateObject("WScript.Shell") 
WshShell.run "cmd.exe" 
WScript.Sleep 500 
'Send commands to the window as needed - IP and commands need to be customized 
'Step 1 - Telnet to remote IP' 
WshShell.SendKeys "telnet 123.456.789.01" 
WshShell.SendKeys ("{Enter}") 
WScript.Sleep 500 
'Step 2 - Issue Commands with pauses' 
'USERNAME 
WshShell.SendKeys "USERNAMEHERE" 
WshShell.SendKeys ("{Enter}") 
WScript.Sleep 500 
'PASSWORD 
WshShell.SendKeys "PASSWORDHERE" 
WshShell.SendKeys ("{Enter}") 
WScript.Sleep 500 
'RESET 
WshShell.SendKeys "reset" 
WshShell.SendKeys ("{Enter}") 
WScript.Sleep 500 
'CONFIRM 
WshShell.SendKeys "y" 
WshShell.SendKeys ("{Enter}") 
WScript.Sleep 500 
'Step 3 - Exit Command Window 
WshShell.SendKeys "exit" 
WshShell.SendKeys ("{Enter}") 
WScript.Quit 
</script> 
</job> 

답변

1

오류 코드 또는 스크립트 파일 XML 구문에 대해 Google에 알려 주셨습니까? <package> 루트 요소가 누락되어 있으며 파일 이름 확장자가 잘못되었습니다 (.wsf 여야 함).