没有机器可以远程连接,无法测试,你按这个思路自己试下吧,需要的话百度hi交流下。
@echo off
start mstsc /v: 125.76.249.12:65533 /console
Dim WshShell>r.vbs
Set WshShell=WScript.CreateObject("WScript.Shell")>>r.vbs
WScript.Sleep 200>>r.vbs
WshShell.AppActivate "远程桌面连接">>r.vbs
WScript.Sleep 200>>r.vbs
WshShell.SendKeys "administrator">>r.vbs
WScript.Sleep 200>>r.vbs
WshShell.SendKeys "{TAB}">>r.vbs
WScript.Sleep 200>>r.vbs
WshShell.SendKeys "12345678">>r.vbs
WScript.Sleep 200>>r.vbs
WshShell.SendKeys "{ENTER}">>r.vbs
start r.vbs
del r.vbs