|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
IntroductionMy article for RDP describes how to manage remote desktop sessions to provide assistance, but this is only for Vista, and lots of users (including myself!) still run XP. Here is the way to establish a remote assistance session without manually calling Help and Support. My experimental project "Turbo Remote" uses this technique if it detects something less than Windows Vista. Requirements
Contents
Implementation of the server step-by-stepThe application that needs to create the "listening" session must perform the following:
#import "HelpServiceInterfaces.tlb" rename_namespace("HSITLB") named_guids\
rename("EOF", "XX_EOF")\
rename("GetUserName", "GetUserName_Renamed")\
rename("EncryptFile", "EncryptFile_Renamed")\
rename("DecryptFile", "DecryptFile_Renamed")\
rename("ULONG_PTR","ULONG_PTR1")
If the above code generates IPCHService*.CoCreateInstance(HSITLB::CLSID_PCHService, NULL, CLSCTX_LOCAL_SERVER,
__uuidof(HSITLB::IPCHService),(void**)&p);
Note the usage of IPCHService::raw_RemoteConnectionParms(), providing the username, the computer name, the Terminal Services session ID (WTSGetActiveConsoleSessionId()), and the blob request, which has the following format:"13;UNSOLICITED=1<X>;ID=<PCName>\\<Username>";
Replace <PCName> and <Username> with the required values, and <X> with the string length of everything after <X>. For example: "13;UNSOLICITED=122;ID=GATOR\\Administrator". My PC name is GATOR, my user name is Administrator, and the total length of the string "ID=GATOR\Administrator" is 22. Examining the ticketThe next thing you must do is to examine the ticket (which is something like that: 65538,1,192.168.1.21:3389;laptop:3389,*, KwRrNVpWH2g1vKfVlQUrJHKcpi8N1XA++9tQ+wnAXyE=,*,*,sdP7Lk3SFAXXcIrKpvLW6IJ8fg=) to replace the port 3389 (which is always placed there!) with the port that the Terminal Services Server is actually running. This port is located at "PortNumber" at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp. Creating the .MSRCINCIDENT fileThis is a Unicode file (the BOM header \xFE\xFF must be present) with the following format: <?xml version="1.0" encoding="Unicode" ?>
<UPLOADINFO TYPE="Escalated">
<UPLOADDATA USERNAME="Administrator"
RCTICKET="<ticket>" RCTICKETENCRYPTED="0"
DtStart="X" DtLength="Y" L="0"/>
</UPLOADINFO>
After you have that file, you can send it via TCP/IP or other methods to the client. Implementation of the clientThe implementation of the client is simply receiving the msrcincident file and running it with Help and Support through History
|
||||||||||||||||||||||