Allow UDP 3389 at firewall configuration

This commit is contained in:
Jim Yang 2018-04-15 17:51:57 +08:00 committed by Stanislav Motylkov
commit 56915ccf5b
2 changed files with 6 additions and 3 deletions

View file

@ -978,8 +978,10 @@ end;
procedure TSConfigFirewall(Enable: Boolean);
begin
if Enable then
ExecWait('netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=tcp localport=3389 profile=any action=allow')
else
begin
ExecWait('netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=tcp localport=3389 profile=any action=allow');
ExecWait('netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=udp localport=3389 profile=any action=allow');
end else
ExecWait('netsh advfirewall firewall delete rule name="Remote Desktop"');
end;