Remove “Connect to a remote PC” tab from Remote Desktop Web Access


UPDATE: See Paulo’s comment for an update / fix from Microsoft for this issue. My solution still works, but a Microsoft update is available.

Recently we published a Remote Desktop connection for a customer using Windows 2012 Remote Desktop Web Access.
Upon showing the page, the tab “Connect to a remote PC” was shown:Image
When testing the environment the customer wanted this tab removed, since it added only confusion to the users.

Googling around I found several solutions. One as described by Microsoft in http://technet.microsoft.com/en-us/library/cc731465.aspx which describes a method using IIS Manager to edit the application properties to not show Remote Desktops in a Windows 2008R2 environment.
This method is also described by numerous other people to be working in Windows 2012 environments.
Since we only publish a Remote Desktop connection and no Remote Apps, we ran into an issue:
Image
Obviously all Remote Desktop functionality is hidden now.

Solution:
On your server hosting the RDweb application open a File Explorer and browse to C:\Windows\Web\RDweb\Pages.
Make a safety-copy of the file “Site.xsl” and then edit the original file.
Image
Remove the selected lines. This will effectively remove the seperator between the two tabs on the Remote Web Access page.
Image
Edit the textblock <xsl:otherwise>.. </xsl:otherwise> as shown in the screen above and save your changes. This last edit will effectively remove the ability to click the second tab.

Next browse to C:\Windows\Web\RDweb\Pages\en-us (or any language you support).
Make a safety-copy of the file “Default.aspx” and then edit the original file.
Image
Find the highlighted line and edit it to look like the line shown in the screenshot. So remove the text “<%=L_DesktopTab_Text%>” and change “Desktops.aspx” into “Default.aspx”. This change effectively “hides” the tab.

Reload the Remote Web Access page:
Image
Voila, tab to “Connect to a remote PC” removed, Remote Desktop functionality retained.
You will probably have to redo these changes after patches / service packs that affect the RDweb application.

Arjan

20+ years experience in Microsoft powered environments. Enjoy automating stuff using scripts, powershell, and even batch files. In my free time (hah! as if there is any) I hunt achievements and gamerscore on anything Xbox Live enabled (Windows Mobile, Windows 8, Windows 10, Xbox 360 and Xbox One). When I'm not doing that I enjoy traveling or riding my Yamaha R1 on the edge ;)

Tagged with: , , ,
Posted in Customize, Remote Desktop, Windows 2012
9 comments on “Remove “Connect to a remote PC” tab from Remote Desktop Web Access
  1. Kevin peterson says:

    No need to do such complex coding for remotely accessing computers. There are already readymade remote support tools available in market such as logmein, gosupportnow, GoToMyPC, RHUB appliances etc. which can be used for remotely accessing computers from anywhere.

  2. Paulo says:

    You don’t need to remove code.

    Microsoft Bug and Workarround:

    http://support.microsoft.com/kb/2743682

  3. Rajeev says:

    There is no need to change OS’s code to show/hide this tab, this functionality is already built in in the RDWeb configuration. Set ShowDesktop variable to be false. More info here:
    http://technet.microsoft.com/en-us/library/cc731465.aspx

    • Arjan Mensch says:

      You are correct. However, at the time of writing, there was a bug in the code (confirmed) which is described in the post. The post was based on experiencing the bug in Windows 2012. I too can confirm that this bug has been addressed at least in Windows 2012 R2.

  4. Ryan Davis says:

    These articles are fantastic–thanks! Is there any way to show the “Connect to a remote PC” tab only for specific users/groups?

  5. Eli says:

    I guess MS fixed it fully. I’m using fully patched 2012R2 as of September 2015.
    Just changed “showdesktop” in IIS to “false”. No code changes needed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog Authors
Donate Button

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 322 other followers

Blog Stats
  • 1,913,769 hits
%d bloggers like this: