A couple of weeks ago I upgraded to Windows 7 and I have to say that compared to Vista it’s actually a usable operating system and I’m quite enjoying it.

However, there was one issue that was bugging me – I have several remote desktop sessions for various servers set and saved to open in a 1024×768 window, in Windows XP those RDP sessions worked great.

Windows 7 seems to have a bug where, no matter what the windows size it set to the window opens slightly to small, causing you to have to stretch the window to get it to the proper size.

I consulted Google for a solution and found this forum thread where Kristin L. Griffin posted a solution [3rd post from the top].

The solution is simple but you will have to edit each of your saved RDP sessions individually:

  1. Open the saved RDP session in notepad (it’s really just a text file).
  2. Locate the following three lines:
    1. desktopwidth:i:
    2. desktopheight:i:
    3. winposstr:s:
  3. desktopwidth:i: and desktopheight:i: are the size of the RDP window.
  4. For example, if the RDP window was set to open at 1024×768 these two lines would look like this:
    1. desktopwidth:i:1024
    2. desktopheight:i:768
  5. The winposstr:s: line controls the RDP window positioning and size and is the line that needs to be edited to fix the sizing issue.
  6. Edit the winposstr:s:line like this:
    1. First value should be 0
    2. Second value should be 1
    3. Third and fourth value should be 50
    4. The fifth value comes from taking the desktopwidth:i:size and adding 90 to it. In the case of a 1024×768 RDP window it works out to be 1114.
    5. The sixth value comes from taking the desktopheight:i: size and adding 90 to it as well. In the case of a 1024×768 RDP window it works out to be 858.
  7. After editing winposstr:s:it should look like this:
    1. winposstr:s:0,1,50,50,1114,858
  8. If you have your RDP sessions opening in a different windows size then the last two values of winposstr:s: will be different than the ones shown.
  9. Save the file and your RDP window should open sized properly.