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
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
本文转自 simeon2005 51CTO博客,原文链接:http://blog.51cto.com/simeon/46233