RDP Client Connections

A nifty way to get clients connecting back to their own PCs using Citrix and the windows RDP client. Working from home is an ever increasing necessity for a number of different reasons, its easy to provide access directly to a clients computer with this method.

Grab any Wake On Lan utility that accepts the MAC address passed to it via command line argument, and put it in the same directory as this batch file. It’s assumed the PCs support Wake On Lan (WOL)… as most modern machines certainly should.

With this utility, clients can be given their own Citrix application to connect back to their PC in the office, even when its turned off. Pass the computer name and the MAC address of the computer to the wakeup_script.bat file when publishing the Citrix application.

Eg:

wakeup_script.bat mycomputer 00c0b3000021

:: wakeup_script.bat
@Echo Off
SET COMP=%1
SET MAC=%2

 :P ING
ping -n 1 -w 3000 %COMP% |find "Reply"
if errorlevel 1 goto :WAKEUP

:WAKEUP
wol.exe %MAC%

Echo Just waking up your computer, hang on.

goto :P ING

:RUNAPP

START %systemroot%\system32\mstsc.exe /v:%COMP% /console /f 


Needless to say that security is paramount and utmost care should be taken when publishing any resource on the internet.

One Response to “RDP Client Connections”

  1. Peety says:

    We used a similar commercial system to achieve the same outcome, but this would leverage an existing Citrix server infrastructure nicely… good work.

Leave a Reply