4

Is there any way to comment out options in a .rdp Remote Desktop Connection file?

A good summary of the options can be found at https://www.donkz.nl/overview-rdp-file-settings/, but there's no mention of a comment syntax.

I've tried prefixes like #, //, ;, :.

The built-in mstsc.exe client seems to ignore the lines, but the Remote Desktop App complains about the format.

Couldn't connect

The RDP file provided is invalid. Make sure the file contains the full address and is formatted properly or contact your admin for help.

4
  • Have you tried the prefix ; (semi-colon)? Found on this page under the "Command File" section (and ChatGPT offers it as a suggestion). Commented May 23 at 11:38
  • 1
    @SaaruLindestøkke - ChatGPT is absolutely incorrect. A page for a client that isn’t RDP isn’t applicable to the client the author is using
    – Ramhound
    Commented May 23 at 11:49
  • That's why I didn't write it as an answer, just something to try out and note as "things that have been tried" in the OP. Commented May 23 at 12:00
  • 1
    I've added : and ; to the list of things I've tried, no success though.
    – mwfearnley
    Commented May 23 at 12:37

2 Answers 2

2

For now I've settled on an old-school "REM" method of commenting out options.

REM full address:s:example.com

My guess is that Remote Desktop clients treat REM full address the same way they would any other unrecognised option, and ignore it for the sake of forwards-compatibility.

This method likely depends on the line being syntactically correct though, so won't work for arbitrary strings.

0

use :: like:

:: full address:s:hostname:port
1
  • I've tried :: on your suggestion, and mstsc is happy, but the Remote Desktop App still complains.
    – mwfearnley
    Commented Jun 14 at 10:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .