@echo off color 0a title @@修改Windows XP/2003/2008远程桌面服务端口号@@

echo *

echo 请输入您要修改的远程桌面端口号,范围:1-65535,不能与其他端口冲突*

echo **

echo.

set /p port=请输入新的端口号:

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp" /v PortNumber /t reg_dword /d %port% /f

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v P