Skip to content

Commit 0d3d651

Browse files
committed
feat: expand supported rdp properties to match https://learn.microsoft.com/en-us/azure/virtual-desktop/rdp-properties
1 parent 21f7fb1 commit 0d3d651

File tree

1 file changed

+93
-31
lines changed

1 file changed

+93
-31
lines changed

src/launcher.cs

Lines changed: 93 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,101 @@
1010

1111
class RdpLauncher
1212
{
13-
/* The `rdpOptions` dictionary is used to determine valid keys. */
13+
/// <summary>
14+
/// The dictionary of valid RDP options and their expected formats.
15+
/// <br />
16+
/// See https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/remote-desktop-uri
17+
/// and https://learn.microsoft.com/en-us/azure/virtual-desktop/rdp-properties.
18+
/// </summary>
1419
static Dictionary<string, string> rdpOptions = new Dictionary<string, string>
1520
{
16-
{ "allow desktop composition", "i:<0 or 1>" },
17-
{ "allow font smoothing", "i:<0 or 1>" },
18-
{ "alternate shell", "s:<string>" },
19-
{ "audiomode", "i:<0, 1, or 2>" },
20-
{ "authentication level", "i:<0, 1, or 2>" },
21-
{ "connect to console", "i:<0 or 1>" },
22-
{ "disable cursor settings", "i:<0 or1>" },
23-
{ "disable full window drag", "i:<0 or 1>" },
24-
{ "disable menu anims", "i:<0 or 1>" },
25-
{ "disable themes", "i:<0 or 1>" },
26-
{ "disable wallpaper", "i:<0 or 1>" },
27-
{ "drivestoredirect", "s:* (this is the only supported value)" },
28-
{ "desktopheight", "i:<value in pixels>" },
29-
{ "desktopwidth", "i:<value in pixels>" },
30-
{ "domain", "s:<string>" },
31-
{ "full address", "s:<string>" },
32-
{ "gatewayhostname", "s:<string>" },
33-
{ "gatewayusagemethod", "i:<1 or 2>" },
34-
{ "prompt for credentials on client", "i:<0 or 1>" },
35-
{ "loadbalanceinfo", "s:<string>" },
36-
{ "redirectprinters", "i:<0 or 1>" },
37-
{ "remoteapplicationcmdline", "s:<string>" },
38-
{ "remoteapplicationmode", "i:<0 or 1>" },
39-
{ "remoteapplicationprogram", "s:<string>" },
40-
{ "shell working directory", "s:<string>" },
41-
{ "Use redirection server name", "i:<0 or 1>" },
42-
{ "username", "s:<string>" },
43-
{ "screen mode id", "i:<1 or 2>" },
44-
{ "session bpp", "i:<8, 15, 16, 24, or 32>" },
45-
{ "use multimon", "i:<0 or 1>" },
21+
{ "alternate full address", "s:<value>" },
22+
{ "authentication level", "i:<value>" },
23+
{ "autoreconnect max retries", "i:<value>" },
24+
{ "autoreconnection enabled", "i:<value>" },
25+
{ "bandwidthautodetect", "i:<value>" },
26+
{ "compression", "i:<value>" },
27+
{ "connection type", "i:<value>" },
28+
{ "domain", "s:<value>" },
29+
{ "enablecredsspsupport", "i:<value>" },
30+
{ "enablerdsaadauth", "i:<value>" },
31+
{ "full address", "s:<value>" },
32+
{ "kdcproxyname", "s:<value>" },
33+
{ "negotiate security layer", "i:<value>" },
34+
{ "networkautodetect", "i:<value>" },
35+
{ "password 51", "b:<value>" },
36+
{ "prompt for credentials", "i:<value>" },
37+
{ "prompt for credentials on client", "i:<value>" },
38+
{ "promptcredentialonce", "i:<value>" },
39+
{ "server port", "i:<value>" },
40+
{ "targetisaadjoined", "i:<value>" },
41+
{ "username", "s:<value>" },
42+
{ "allow desktop composition", "i:<value>" },
43+
{ "allow font smoothing", "i:<value>" },
44+
{ "bitmapcachepersistenable", "i:<value>" },
45+
{ "bitmapcachesize", "i:<value>" },
46+
{ "desktopheight", "i:<value>" },
47+
{ "desktop size id", "i:<value>" },
48+
{ "desktopscalefactor", "i:<value>" },
49+
{ "desktopwidth", "i:<value>" },
50+
{ "disable full window drag", "i:<value>" },
51+
{ "disable menu anims", "i:<value>" },
52+
{ "disable themes", "i:<value>" },
53+
{ "disable wallpaper", "i:<value>" },
54+
{ "dynamic resolution", "i:<value>" },
55+
{ "enablesuperpan", "i:<value>" },
56+
{ "encode redirected video capture", "i:<value>" },
57+
{ "maximizetocurrentdisplays", "i:<value>" },
58+
{ "redirectdirectx", "i:<value>" },
59+
{ "screen mode id", "i:<value>" },
60+
{ "selectedmonitors", "s:<value>" },
61+
{ "session bpp", "i:<value>" },
62+
{ "singlemoninwindowedmode", "i:<value>" },
63+
{ "smart sizing", "i:<value>" },
64+
{ "span monitors", "i:<value>" },
65+
{ "superpanaccelerationfactor", "i:<value>" },
66+
{ "use multimon", "i:<value>" },
67+
{ "videoplaybackmode", "i:<value>" },
68+
{ "winposstr", "s:<value>" },
69+
{ "gatewaycredentialssource", "i:<value>" },
70+
{ "gatewayhostname", "s:<value>" },
71+
{ "gatewayprofileusagemethod", "i:<value>" },
72+
{ "gatewayusagemethod", "i:<value>" },
73+
{ "audiocapturemode", "i:<value>" },
74+
{ "audiomode", "i:<value>" },
75+
{ "audioqualitymode", "i:<value>" },
76+
{ "camerastoredirect", "s:<value>" },
77+
{ "devicestoredirect", "s:<value>" },
78+
{ "drivestoredirect", "s:<value>" },
79+
{ "redirected video capture encoding quality", "i:<value>" },
80+
{ "redirectcomports", "i:<value>" },
81+
{ "redirectlocation", "i:<value>" },
82+
{ "redirectposdevices", "i:<value>" },
83+
{ "redirectprinters", "i:<value>" },
84+
{ "redirectsmartcards", "i:<value>" },
85+
{ "usbdevicestoredirect", "s:<value>" },
86+
{ "disableremoteappcapscheck", "i:<value>" },
87+
{ "remoteapplicationcmdline", "s:<value>" },
88+
{ "remoteapplicationfile", "s:<value>" },
89+
{ "remoteapplicationexpandcmdline", "i:<value>" },
90+
{ "remoteapplicationexpandworkingdir", "i:<value>" },
91+
{ "remoteapplicationicon", "s:<value>" },
92+
{ "remoteapplicationmode", "i:<value>" },
93+
{ "remoteapplicationname", "s:<value>" },
94+
{ "remoteapplicationprogram", "s:<value>" },
95+
{ "workspaceid", "s:<value>" },
96+
{ "administrative session", "i:<value>" },
97+
{ "alternate shell", "s:<value>" },
98+
{ "disable ctrl+alt+del", "i:<value>" },
99+
{ "disableconnectionsharing", "i:<value>" },
100+
{ "displayconnectionbar", "i:<value>" },
101+
{ "keyboardhook", "i:<value>" },
102+
{ "pinconnectionbar", "i:<value>" },
103+
{ "public mode", "i:<value>" },
104+
{ "redirectclipboard", "i:<value>" },
105+
{ "redirectwebauthn", "i:<value>" },
106+
{ "shell working directory", "s:<value>" },
107+
{ "signscope", "s:<value>" }
46108
};
47109

48110
static void Main(string[] args)

0 commit comments

Comments
 (0)