Thursday, September 11, 2008

A Problem Sharing Files via Remote Desktop

While on vacation, I'd left a PDF on my home computer which I wanted to browse on my laptop on vacation. It's about 75 MB, not exactly feasible to email.

Both machines run Windows XP, however, and I figured I could use its ability to bring the resources of my laptop, including its hard drive, to the remote session on my desktop at home. I opened Remote Desktop, expanded Options, then clicked on Local Resources, and checked so that sharing all available drives was enabled.

No such luck, at first. Although I could see the laptop's CD-ROM drive present as \\TSCLIENT\D its hard drive, which should've been there as \\TSCLIENT\C was nowhere to be found! My laptop is a machine I normally use at work, and is part of their Active Directory and various group policies. I'm not privy to what the group policies specifically secure, but my guess was that some policy setting might be responsible for making my drive inaccessible via the remote session.

After some thought I remembered an old friend from the DOS days, the SUBST utility.

When diskettes were popular, some developers hard-coded their software specifically to look for the A: drive, with no option to select another. This was fine if you had a newer PC with a 3.5" drive as A:, but what if you'd upgraded some old clunker which had an older 5.25" drive as A:, and a newly installed 3.5" as B: instead? You'd be stuck having to crack open the case and swap around the drives... if not for SUBST.

I decided to try SUBST here to see if I could bring my laptop's hard drive to the remote session, masquerading as a different drive letter on \\TSCLIENT. Thus, I opened a command prompt and entered the following from my laptop:

SUBST Z: C:\

This basically tells your computer to use a given substitute drive letter Z: to represent drive C: which is somewhat similar to using symbolic links in the *nix world. I opened My Computer, and now I could see a Z: drive, and clicking it brings up an Explorer window with the exact contents of my C: drive.

Now, I open Remote Desktop, and open a session to my home computer. Lo and behold, drive Z: appears in the remote session as well! I could then Paste my PDF file from my home machine to my laptop and browse it happily. Of course, this copy process takes a LOT longer than it might over a normal, unencrypted connection, but it gets the job done, and sometimes that's all that matters.

No comments: