Ciao a tutti...
Su internet ho trovato quest che ho adattato alle mie esigenze...
<script language="VBScript">
Option Explicit
On Error Resume Next
Dim WshShell
set WshShell=CreateObject("WScript.Shell")
WshShell.run "cmd.exe"
WScript.Sleep 1000
WshShell.SendKeys "telnet x.x.x.x"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 1000
WshShell.SendKeys "Mia Login"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 250
WshShell.SendKeys "La password"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 250
WshShell.SendKeys "poweroff -p"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 250
WshShell.SendKeys "exit"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500
WshShell.SendKeys "exit"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 1000
WScript.Quit
</script>
ma dopo aver convertito il file di testo in .vbs, cliccandoci sopra il PC risponde con un errore sulla prima riga 800a0400
Non ho mai programmato in VBscript.
Dov'e' l'errore ?