<p>'**********************************************<br />'*BY r05e<br />'*改变终端服务端口号<br />'**********************************************<br />Set WshShell=CreateObject("Wscript.Shell")<br />Function Imput()<br />imputport=InputBox("请输入一个端口号,注意:这个端口号目前不能被其它程序使用,否则会影响终端服务"," 更改终端端口号", "3389", 100, 100)<br />If imputport<>"" Then<br />If IsNumeric(imputport) Then</p><p>WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp\PortNumber",imputport,"REG_DWORD"<br />WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber",imputport,"REG_DWORD"<br />wscript.echo "操作成功"<br />Else wscript.echo "输入出错,请重新输入"<br />Imput()<br />End If<br />Else wscript.echo "操作已经取消"<br />End If<br />End Function<br />Imput()<br />set WshShell=nothing</p> |
|