Glam Prestige Journal

Bright entertainment trends with youth appeal.

Is it possible to have a URL that launches a remote desktop session? I realize it may be considered a security vulnerability for some, but the convenience would really save me a lot of time.

I would like to have a hyperlink like: remotedesktop://example.org where clicking on it launches mstsc.exe with the target computer filled in (in this case with example.org).

How best to set this up?

9 Answers

You could use a custom URL protocol handler, but this would mean the URLs only worked on computers where you had set this up. I think you'd also need a program to handle taking the URL as remotedesktop://example.org and converting to /v:example.org - although a batch file could probably do this.

See (v=vs.85).aspx for more information.

4

For Windows 8.1, Windows Server 2012 R2 there is now the Remote Desktop Client URI Scheme Support

Example: rdp://full%20address=s:mypc:3389&audiomode=i:2&disable%20themes=i:1

See here for the details, including the full list of query string parameters.

3

I originally said no, but if you have XP, there is something called the Remote Desktop Web Connection. I initially forgot there was a version for XP.

3

There is currently no official way

Well, Microsoft SAYS they have two URI schemes for this in Server 2012 R2: ms-rd:// and rdp://

But as of now, 2020-10-16, these do NOT work on my Win10 machine. (Exact version: ver.exe outputs: Microsoft Windows [Version 10.0.19041.572])

So if I run inside cmd.exe either of these:

C:\>start ms-rd://example.com

or

C:\>start rdp://example.com

then nothing good happens. I just get the generic "Pick an app" dialog. (C:\Windows\System32\OpenWith.exe)

And I double checked with URLProtocolView () and: No. Neither scheme is registered with a handler on my system.

Also these schemes are NOT in the official IANA URI Scheme list ()

So the answer seems to be: Nope. There is no URI scheme for RDP that you can expect to "just work" on a modern PC. You can MANUALLY make it work, by just manually adding a scheme and a handler. (See other answers.) But that's not the same.

Sources: Microsoft talking about their URI schemes here:

I think this would work, and might be the effect you are looking for:

With your local copy of Remote Desktop, set up a connection to the target host. But don't connect; instead, save the connection as an RDP file.

Place that file on your web server. Serve the file with a standard <A HREF=' link. (Note: you may need to update your web server config to "download" this file rather than "serve" it to the web browser.)

The user will probably need to know to run the downloaded file... but it should get their computer to launch RD and initiate a connection to the target host.

This might be useful to someone, but here's an Open Source .NET exe that registers the URL handling off to mstsc:

After running that, it will allow you to click links like this: mstsc://your-server/?w=1024&h=768

It's not quite what you want, but with Windows Server 2008/R2, you can have your RemoteApps and RDP machines shown on a TS/RD Web Access webpage.

In conjunction with TS/RD Gateway, you could have RDP working through port 443, which is useful in places that block other ports.

TS Web Access

1

Save the following text as C:\Windows\RDP.js:

var destination=(WScript.Arguments(0))
var search='rdp://'
var rdpexe='C:\\WINDOWS\\system32\\mstsc.exe'
//WScript.Echo(destination)
destination=destination.replace(search, '')
destination=destination.replace('/', '')
var ws = new ActiveXObject("WScript.Shell")
//WScript.Echo(rdpexe + " /v:" + destination)
ws.Exec(rdpexe + " /v:" + destination)

Save the next piece as RDP.reg:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\rdp]
@="URL:Remote Desktop Connection"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\rdp\DefaultIcon]
@="C:\\WINDOWS\\System32\\mstsc.exe"
[HKEY_CLASSES_ROOT\rdp\shell]
[HKEY_CLASSES_ROOT\rdp\shell\open]
[HKEY_CLASSES_ROOT\rdp\shell\open\command]
@="wscript.exe C:\\WINDOWS\\rdp.js %1"

Double click and woalya! When you click something like rdp://192.168.0.1 you will be connected to that server by RDP.

Old topic, but Chrome has a remote desktop plugin to do that.

You also have HTML5 based solutions like Guacamole for Linux or Myrtille for Windows.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy