Two Methods to Enable Remote Desktop Connection on a Local Area Network
15:33, vkill1, Implement with the wmic command (recommended)
The following are two examples of enabling. To disable, change the last 1 to 0.
#server 192.168.88.100
#user administrator
#pass 1234567
wmic /node:192.168.88.100 /user:administrator /password:1234567 PATH win32_terminalservicesetting WHERE (__Class!="") CALL SetAllowTSConnections 1
#server 192.168.88.100
#user administrator
#pass `empty password`
wmic /node:192.168.88.100 /user:administrator /password:"" PATH win32_terminalservicesetting WHERE (__Class!="") CALL SetAllowTSConnections 1
2. Implement by modifying the inf to modify the registry
@echo off :: 3389.cmd ::
more +4 "%~0" > 3389.inf & rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 .\3389.inf & del /q 3389.inf
exit /b
::::::::::::::::::::
[Version]
Signature="$WINDOWS NT$"
[DefaultInstall]
Addreg=AddReg.
[AddReg.]
HKLM,"SYSTEM\CurrentControlSet\Control\Terminal Server",fDenyTSConnections,0x00010001,0
First save the above code as a 3389.cmd file, and then use the following example to enable.
#server 192.168.88.100
#user administrator
#pass 1234567
psexec \\192.168.88.100 -u administrator -p 1234567 -c 3389.cmd
有问题请发论坛或者自行搜索,再短消息问我的统统是SB