idlost 发表于 2018-11-30 10:08:16

免开防火墙直接开启3389远程方法

本帖最后由 idlost 于 2018-11-30 10:21 编辑

3389远程是网吧常用的远程工具。自己手动启用3389还要求开启防火墙服务,非常烦。有了这个方案运行一下批处理就搞定了。

切记

3389启用后一定记得把端口改掉.防止被人利用!

免防火墙开启3389远程脚本


==========================================================================
@echo off

@echo [启用3389功能]
Reg Add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /F 0> NUL 1> NUL 2> NUL
@echo [启动3389服务]
Reg Add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService" /v Start /t REG_DWORD /d 2 /F 0> NUL 1> NUL 2> NUL
net start TermService 0> NUL 1> NUL 2> NUL


ver | find "5.2." > NUL &&goto old
ver | find "6.0." > NUL &&goto new
ver | find "6.1." > NUL &&goto new
ver | find "6.2." > NUL &&goto new
ver | find "10.0." > NUL &&goto new

:old
@echo
Reg Add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess" /v Start /t REG_DWORD /d 4 /F 0> NUL 1> NUL 2> NUL
net stop SharedAccess 0> NUL 1> NUL 2> NUL
@echo.
@echo 设置完成,3389远程时,被远程电脑必须有系统密码,如果未设置系统密码,请手工设置!
@echo.
pause
goto end

:new
@echo
Reg Add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MpsSvc" /v Start /t REG_DWORD /d 4 /F 0> NUL 1> NUL 2> NUL
net stop MpsSvc 0> NUL 1> NUL 2> NUL
@echo.
@echo 设置完成,3389远程时,被远程电脑必须有系统密码,如果未设置系统密码,请手工设置!
@echo.
pause
goto end

==========================================================================


复制另存为BAT就行了!


注:如果觉得麻烦,下载附件里的文件,直接点击运行即可。








zxc205925 发表于 2024-9-29 18:10:27

那么如何一键关闭3389呢?
页: [1]
查看完整版本: 免开防火墙直接开启3389远程方法