Windows Mobile: Hidden Remote Desktop Client Clipboard support

Print This Post Print This Post

Recently I looked for support of starting an alternative shell when using Remote Desktop Mobile on a Windows Embedded Handheld 6.5.3 device.

MSDN says that I can to specify AlternateShell in a rdp file. As Windows Mobile devices always use \Windows\default.rdp, I added the following two lines and tested what happens.

WorkingDir:s:C:\Program Files (x86)
AlternateShell:s:C:\Program Files (x86)\notepad.exe

Unfortunately the above entries are ignored 🙁

But why? I decided to look inside wpctsc.exe I dumped of a WEH device to see which strings (used sysinternals strings app) are known to the Mobile Remote Desktop client. And, no surprise, AlternateShell is not known inside wpctsc.exe. But I saw two other interesting strings around the ones used in rdp files.

\windows\TscShift.txt
GrabFocusOnConnect
MinutesToIdleTimeout
SavePassword
AutoLogon
MCSPort
ServerName
Domain
Password
UserName
DisableFileAccess
BBarEnabled
EnablePrinterRedirection
EnableSCardRedirection
AutoReconnectEnabled
EnableDriveRedirection
EnablePortRedirection
AudioRedirectionMode
BitmapPersistenceEnabled
BBarShowPinBtn
Compress
KeyboardHookMode
MaxReconnectAttempts
Disable Wallpaper
Disable Full Window Drag
Disable Menu Anims
Disable Themes
DesktopHeight
DesktopWidth
ScreenStyle
ColorDepthID
KeyboardLayoutString
0x00000409
KeyboardType
KeyboardSubType
KeyboardFunctionKey
FullScreenAlways
BBarPinned
EnableClipboardRedirection
RDPIdleTimeout

Oh, EnableClipboardRedirection sounds very promising to me. Just thought about the slow data input of barcode scanning into a Remote Desktop application. That transfer is done using keyboard messages with delays in between every key that is simulated.

So, I prepared a default.rdp with the new setting. First I started one remote desktop session of the mobile device and then downloaded the default.rdp created by wpcstc.exe. Then I added one line:

EnableClipboardRedirection:i:1

Then I copied the changed file back to \windows on the device and stopped remote desktop client on the device using the task manager app on the device. To test the new setting I used a small text in notes on the device, marked some text and used the software keyboard to issue a Ctrl+C to copy the text to the clipboard. Then switched to the remote session and tested Ctrl+V inside the servers notepad app. Yes, that works.

To check that with the WEH device and it’s barcode scanning software I switched the wedge method to Block Mode and tested barcode input again in the server’s notepad app.

wedgemode-block

I used a 500 char PDF barcode for the test and it was shown within notepad as fast I did never see before with barcode scanned data transfer (in a remote session). Although I am not a friend of videos I did a short an ugly one using MyMobiler scaled and converted to flv by ffmpeg on a linux machine:

rdp session with block and char mode

By the way, the other interesting string (RDPIdelTimeout) does not work. I just put the line

RDPIdleTimeout:i:0

into my copy of default.rdp and copied it back to \windows on the device. After restarting the remote desktop client on the device it still disconnected after 10 minutes of no user action. Sorry, no help.

WHY are these settings not documented anywhere by Microsoft? Or do you know a location?

Download default.rdp sample: [Download not found]

Leave a Reply