热搜词
发表于 2008-3-23 18:25:46 | 显示全部楼层 |阅读模式
<p>&#39;**********************************************<br />&#39;*BY r05e<br />&#39;*改变终端服务端口号<br />&#39;**********************************************<br />Set WshShell=CreateObject("Wscript.Shell")<br />Function Imput()<br />imputport=InputBox("请输入一个端口号,注意:这个端口号目前不能被其它程序使用,否则会影响终端服务"," 更改终端端口号", "3389", 100, 100)<br />If imputport&lt;&gt;"" Then<br />If IsNumeric(imputport) Then</p><p>WshShell.RegWrite "HKLM&#92;SYSTEM&#92;CurrentControlSet&#92;Control&#92;Terminal Server&#92;Wds&#92;rdpwd&#92;Tds&#92;tcp&#92;PortNumber",imputport,"REG_DWORD"<br />WshShell.RegWrite "HKLM&#92;SYSTEM&#92;CurrentControlSet&#92;Control&#92;Terminal Server&#92;WinStations&#92;RDP-Tcp&#92;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>
全部评论0
回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )

GMT+8, 2024-11-25 09:28 , Processed in 0.162541 second(s), 22 queries .

Powered by Discuz! X3.5

Cpoyright © 2001-2024 Discuz! Team