vbs更改3389遠(yuǎn)程桌面端口的腳本
更新時(shí)間:2008年05月20日 22:19:23 作者:
用vbscript實(shí)現(xiàn)的修改服務(wù)器3389端口的代碼,比較方便使用,不用每次都要進(jìn)注冊(cè)表修改,方便大家
Set WshShell=CreateObject("Wscript.Shell")
Function Imput()
imputport=InputBox("請(qǐng)輸入一個(gè)端口號(hào),注意:這個(gè)端口號(hào)目前不能被其它程序使用,否則會(huì)影響終端服務(wù)"," 更改終端端口號(hào)", "3389", 100, 100)
If imputport<>"" Then
If IsNumeric(imputport) Then
WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp\PortNumber",imputport,"REG_DWORD"
WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber",imputport,"REG_DWORD"
wscript.echo "操作成功"
Else wscript.echo "輸入出錯(cuò),請(qǐng)重新輸入"
Imput()
End If
Else wscript.echo "操作已經(jīng)取消"
End If
End Function
Imput()
set WshShell=nothing
Function Imput()
imputport=InputBox("請(qǐng)輸入一個(gè)端口號(hào),注意:這個(gè)端口號(hào)目前不能被其它程序使用,否則會(huì)影響終端服務(wù)"," 更改終端端口號(hào)", "3389", 100, 100)
If imputport<>"" Then
If IsNumeric(imputport) Then
WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp\PortNumber",imputport,"REG_DWORD"
WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber",imputport,"REG_DWORD"
wscript.echo "操作成功"
Else wscript.echo "輸入出錯(cuò),請(qǐng)重新輸入"
Imput()
End If
Else wscript.echo "操作已經(jīng)取消"
End If
End Function
Imput()
set WshShell=nothing
相關(guān)文章
利用vbs腳本實(shí)現(xiàn)設(shè)置IE的打印頁眉頁腳信息
這篇文章主要為大家分享下通過vbs腳本實(shí)現(xiàn)設(shè)置IE的打印頁眉頁腳信息的代碼,需要的朋友可以參考下2007-02-02SQLids.vbs 0.7(最終版,以后改成gui界面的)
今天搞了個(gè)網(wǎng)站,注入點(diǎn)過濾得很變態(tài),工具都不能跑,于是寫了這個(gè)東東。2009-10-10利用vbs寫的延時(shí)關(guān)閉ie進(jìn)程的腳本代碼
windows 利用vbs 寫的延時(shí)關(guān)閉ie進(jìn)程的腳本,需要的朋友可以參考下。2010-11-11WMI IE代理 切換或改變(Use WMI Change IE Proxy)
把你弄到的代理都寫在一個(gè)文本文件里(IP.txt),格式是一行一個(gè): ip:端口2008-12-12