Remotely enable Remote Desktop under Windows XP #
- In regedit, click File > Connect Network Registry...
- Type the remote computer name, click Check Names and then OK
- Enter remote admin password if prompted
- Click HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server for the remote computer and change the value of fDenyTSConnections to 0.
- If a reboot of the remote PC is required: shutdown -m \\ remotepcname -r
The above steps can also be done via SSH or PsTools in case the Remote Registry service is disabled or you've only got terminal-based access to the machine. See Jim's Remotely Enabling Remote Desktop Protocol From the Command Line for more information (it's also the source for most of the commands below).
If Windows Firewall is enabled on the remote PC, and no exception has been previously setup for Remote Desktop, you'll need to create one. We'll get a remote command prompt with PsExec from PsTools and check the firewall state:
C:\>PsExec.exe \\remotepcname -u user -p "pass with spaces" cmd
PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Windows\system32>netsh firewall show state
Firewall status:
-------------------------------------------------------------------
Profile = Standard
Operational mode = Enable
Exception mode = Enable
...
Ports currently open on all network interfaces:
Port Protocol Version Program
-------------------------------------------------------------------
137 UDP IPv4 (null)
139 TCP IPv4 (null)
138 UDP IPv4 (null)
445 TCP IPv4 (null)
No exception exists for 3389 (the default Remote Desktop port), so we'll create one:
C:\Windows\system32>netsh firewall set portopening protocol = TCP port = 3389 name = "Remote Desktop Protocol" mode = ENABLE
Ok.
C:\Windows\system32>netsh firewall show state
...
Ports currently open on all network interfaces:
...
138 UDP IPv4 (null)
3389 TCP IPv4 (null)
445 TCP IPv4 (null)
...
Now the remote PC can be accessed normally via Remote Desktop.
/windows | Sep 10, 2011
Subscribe or visit the archives.