Hi

I had a customer who asked if it was possible to add multi monitor support in RD Webaccess without creating a new Remote Desktop Session Collection.

I found this solution that works. The solution changes some files on the webaccess webpage so be sure to backup these files as they may be overwritten when updating Remote Desktop Services.  I found the solution from the following website but I have added some lines to make it work –> http://serverfault.com/questions/582148/add-multi-monitor-option-to-remote-desktop-web-access

To accomplish this you need to execute the following steps:

  • Change the application settings in IIS Manager
  • Modify the Site.xsl file
  • Modify the RDWAStrings.xml file

Change the application settings in IIS Manager

  • Start IIS Manager
  • Go to: Default Web Site -> RDWeb -> Pages -> Application Settings
  • Change the option ShowOptimizeExperience from False to True
  • Change the option OptimizeExperienceState from False to True

Modify the RDWAStrings.xml file

Go to the following path: C:\Windows\Web\RDWeb\Pages\en-US\ Open the file RDWAStrings.xml in notepad

Replace the text:

<string id=”OptimizeMyExperience”>Optimize my experience for a LAN network when connecting to the computer or application.</string>

with the following text:

<string id=”OptimizeMyExperience”>Use multiple monitors.</string>

– Modify the Site.xsl file

Go to the following path: C:\Windows\Web\RDWeb\Pages\ Open the file Site.xsl

Search for the text strRdpFileContents

Replace the text:

<xsl:if test=”$showoptimizeexperience”>

    if (<xsl:value-of select=”$feedidprefix”/>Controls.chkShowOptimizeExperience.checked) {

        var objRegExp = new RegExp(“connection type:i:([0-9]+)”, “i”);

        var iIndex = strRdpFileContents.search( objRegExp );

        <!– Add ‘connection type’ if it does exist otherwise replace. –>

        if ( -1 == iIndex ) {

            if ( “\\n” != strRdpFileContents.charAt(strRdpFileContents.length-1) ) {

            strRdpFileContents += “\\r\\n”;

            }

            strRdpFileContents += “connection type:i:6\\r\\n”;

        } else {

            strRdpFileContents = strRdpFileContents.replace(objRegExp, “connection type:i:6”);

            }

        }

</xsl:if>

With the following text:

<xsl:if test=”$showoptimizeexperience”>

    var pmxUseMultimon = 0;

    if (<xsl:value-of select=”$feedidprefix”/>Controls.chkShowOptimizeExperience.checked) {

        pmxUseMultimon = 1;

    }

    var objRegExp = new RegExp(“use%20multimon%3Ai%3A([0-9])”, “i”);

    var iIndex = strRdpFileContents.search( objRegExp );

    <!– Add ‘use multimon’ if it does exist otherwise replace. –>

    if ( -1 == iIndex ) {

        if ( “\\n” != strRdpFileContents.charAt(strRdpFileContents.length-1) ) {

        strRdpFileContents += “\r\n”;

        }

        strRdpFileContents += “use%20multimon%3Ai%3A”+pmxUseMultimon+”\r\n”;

    } else {

        strRdpFileContents = strRdpFileContents.replace(objRegExp, “use%20multimon%3Ai%3A”+pmxUseMultimon);

    }

</xsl:if>

Note:

As you can see in the original text, Microsoft is searching for the regular expression “connection type:i:”.
In the rdp file content that is generated the text is “connection type%3Ai%3A”.
This means that the option “Optimize my experience” of Microsoft is never going to work.
When you now go to your RDS Web page you will see a check box with the text “Use multiple monitors”