Friday, September 18, 2009

Customizing RDP window size and position

I've mentioned previously that I use Remote Desktop a lot to access many different Dynamics GP servers and environments. I tried the Remote Desktops add-on, but for technical reasons I didn't end up using it, so I currently have 21 rdp files saved to my desktop to access my virtual servers and client servers.

For most of the RDP connections to my virtual servers, I choose to have them run full screen on my second monitor. I like to be able to use ALT+Tab and not have to memorize the RDP equivalent keyboard shortcuts for the non-full screen windows.

But I do have a few RDP connections to my physical servers that I don't like running full screen for various reasons. I liked the option to use 1152 x 864 on my 1680 x 1050 monitors, as it doesn't fill my screen, but gives me enough real estate to still launch a 1024 x 768 window.

Well, I recently upgraded both my laptop and desktop to Windows 7. One of the quirks I've found is that for some reason, I can no longer select the 1152 x 864 size for my remote desktop window. I'm sure there's some explanation having to do with video card drivers or monitor INF files, but I figured there had to be a simple way to get my RDP window sizes to be the same as before.

So I decided to open the RDP file in Notepad, and sure enough, I saw that there were some pretty self-explanatory parameters in the file: desktopwidth, desktopheight, and winposstr. Width and height were easy, but the after adjusting the winposstr parameter, I found that there is something else going on, as I couldn't get the windows to display properly (without the scroll bars).

Sure enough, plenty of people have already dealt with this issue, and I found this post explaining how to pad the window position parameters so that they work properly.

With this knowledge, I can now produce an RDP window with any size that I want--even a window that has a height greater than its width if you want to get fancy. I can also now specify the exact location that I want the window displayed, which is handy as well.

Happy RDP'ing.

No comments: