Setting start up position for Windows RDP Windows

This quick tip explains how to edit saved RDP files to control window startup size, position, and maximized state using the `winposstr` setting. It provides a practical workaround for persistent remote desktop sizing issues on Windows.

Coveros Staff

December 5, 2012

I have an annoying situation where I create RDP windows and they seem to always start the same (but wrong) size. For example, one of my sessions starts “maximized” but only 1280×1024 sized so it ends up having scrollbars inside my 1920×1200 monitor. I then have to de-maximize it, move the window somewhere, and drag the corners to get it to the right size. Another one always starts up in a partial-sized window with scroll bars. When I drag to expand it, it snaps to the edge of the screen and Windows 7 tries to maximize it.

I figured out how to get them the way I like them. Start by editing the saved RDP file with a text editor that won’t mess up the character encoding. (probably not Notepad or Wordpad.) Edit the ‘winposstr’ string. It looks like this:

winposstr:s:0,1,10,10,1708,1105

The values are:

winposstr:s:0,windowState,xLeft,yTop,xRight,yBottomI found that for a 1680×1050 window, I need to add 18 pixels to the width and 45 pixels to the height in Windows 7 to account for the borders. Then, you do the math for (x,y)+(width,height) to figure out the start position of the window and the right,bottom corner.

windowsState can be changed to control the initial maximized state of the window:

  • 1 – normal
  • 2 – unknown
  • 3 – maximized

Save the RDP file, then

That’s it.

Coveros Staff

Coveros Staff

This post represents the collective insights of the Coveros team. Our staff consists of software experts who bring deep experience in secure agile development, DevOps, testing, and software quality. Over the past 20 years, Coveros has trained more than 30,000 professionals and worked with half of the Fortune 100 companies on mission-critical software development challenges. We draw on this extensive experience to share practical insights, proven strategies, and real-world solutions that help organizations build better software faster and more securely.