本帖最后由 无名蜘蛛 于 2010-9-17 08:46 编辑
呵呵,当然会错完整的如下,修改3389远程桌面的端口
不知还可以优化下不?Dim $term
$termo = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp", "PortNumber")$term = InputBox("修改","请输入新端口,当前使用端口"&$termo,"3389")
Select
Case $term = ""
MsgBox(0,"修改","取消操作")
Case $term<=1024 Or $term>9999
MsgBox(0,"修改","不能小于1024或者大于9999")
Case $term>1024 And $term<=9999
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp", "PortNumber", "REG_DWORD",$term)
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp", "PortNumber", "REG_DWORD",$term)
MsgBox(0,"新的端口"&$term,"修改成功!!!!")
|