2014-07-16 5 views
0

오류 예상 문이 계속 나타납니다. 코드 800A0400. Line 1, char 1. 내가 뭘 잘못 했니?VBS 예상 문 오류

내 코드,

# $language = "VBScript" 
# $interface = "1.0" 

' Connect to an SSH server using the SSH2 protocol. Specify the 
' username and password and hostname on the command line as well as 
' some SSH2 protocol specific options. 

Sub Main 

    Dim host 
    host = "ssh.google.com" 
    Dim user 
    user = "userinfo" 

    ' Prompt for a password instead of embedding it in a script... 
    ' 
    Dim passwd 
    passwd = crt.Dialog.Prompt("Enter password for " & host, "Login", "", True) 

    ' Build a command-line string to pass to the Connect method. 
    ' 
    cmd = "/SSH2 /L " & user & " /PASSWORD " & passwd & " /C 3DES /M MD5 " & host 

    crt.Session.Connect cmd 

    End Sub 

답변

2

은 "라인의 마지막에 코멘트는"VBScript를 마커는 작은 따옴표 '하지 #입니다. 그래서

' $language = "VBScript" 
' $interface = "1.0" 

# $language = "VBScript" 
# $interface = "1.0" 

을 변경 (다른 가능한 문제 : 당신은 CRT에서 온 않습니다 전화 하위 주요합니까?)

+0

이 그것을 제거있어 주셔서 감사합니다. 나는 현재 서브 메인이라고 부르지 않는다. 방금이 스크립트 양식을 자습서 양식에 복사하여이 스크립트가 기본 스크립트에 구현 될 수있는 방법을 배우게했습니다. –