@echo off
color 0a
title @@ 修改Windows XP/2003远程桌面服务端口号 @@
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 PortNumber /t reg_dword /d %port% /f
echo.
echo *******************************
echo * 启动远程桌面功能,配置生效 *
echo *******************************
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t reg_dword /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t reg_dword /d 0 /f
echo.
echo 按任意键退出...
pause>nul
exit
阅读(799) | 评论(0) | 转发(0) |