yesJames.com
ahuh… sure… what ever you say…


Enabling Remote Desktop access… remotely

Posted in Software by james on November 19th, 2008

Firstly you can edit the Registry of the remote machine by hand:

Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server on the remote machine, and find the key: fDenyTSConnections
If it doesn’t exist create it, then set it’s value to “0″.

Alternatively you can use the following batch file to do the job for you.
Note: You must be logged into your computer with credentials that allow you to remotely edit the Registry of the machine in question, otherwise the batch file will fail.

syntax: EnableRemoteDesktop.bat RemotePC
NB: This batch file must be run under Windows XP

Save the following to a file named EnableRemoteDesktop.bat

@echo off
setlocal
if {%1}=={} goto syntax

:loop
if {%1}=={} goto finish
set remote="\\%1\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server"
shift
reg.exe ADD %remote% /v fDenyTSConnections /t REG_DWORD /d 0 /f>nul 2>&1
if NOT %ERRORLEVEL% EQU 0 @echo %remote% NOT found.
goto loop

:syntax
@echo Syntax: RemoteDesktop Computer1 [Computer2 .... Computern]
goto loop

:finish
endlocal

Leave a Reply