"adacom" <guest@xxxxxx-email.com> wrote in message
news:9da40364818de2ef38e3706996edd426@xxxxxx-gateway.com...
>
> not understanding vb i have to guess which is line 21 - i am assuming
> blank lines are counted so this would seem to be the error line -or
> maybe they all are faulty and line 21 is the first faulty line
>
>> WshShell.Run "telnet " + ServerName >
> sorry i cannot be sure - that was the reason for my post
>
>
> --
> adacom Use notepad.exe to look at your source code, then count your lines. To be
really sure, insert some labels like so:
ServerName = "192.168.1.9"
> Username = "admin" ' Current Username
> Passwd = "nas" ' Current Password
> XIT = "E" ' Used to "EXIT" from NAS. (upper-case E)
> YES = "y" ' Used to confirm an option. (lower-case Y)
> SHUT = "8" ' Used to SHUTDOWN NAS. (number eight)
> DELAY = 250 ' Minimum 500ms recommended; 1000 works well.
>
> ' --------------------------------------------------------------------
> ' SECTION B: Start a Shell
> ' --------------------------------------------------------------------
> Set WshShell = WScript.CreateObject("WScript.Shell") wscript.echo "Label 1"
' --------------------------------------------------------------------
' SECTION C: Start the TELNET
' --------------------------------------------------------------------
wscript.echo "Label 2"
WshShell.Run "telnet " + ServerName
' --------------------------------------------------------------------
' SECTION D: Login. ("Sleep" pauses are needed delays.)
' --------------------------------------------------------------------
wscript.echo "Label 3"
> WScript.Sleep DELAY
> WshShell.SendKeys Username + vbLf
> WScript.Sleep DELAY
> WshShell.SendKeys Passwd + vbLf Now invoke your script from the Command Prompt like so:
cscript.exe //nologo c:\MyScript.vbs