生成 RDP 配置文件问题

发布于 2024-12-08 08:44:02 字数 803 浏览 0 评论 0原文

我正在开发 ac# 程序,其中一部分是生成自己的 .rdp 文件,该文件将自动连接生成时提供的所有信息。

当我尝试从命令行启动 rdp 文件时,我发现它不是有效的连接配置文件。如果我在窗口中双击它,它就会打开、连接并登录。 所以我知道它生成的密码哈希是正确的。我不明白为什么它通过命令行无效。

这是 .rdp 文件中生成的内容

"full address:s:" + IP
"username:s:" + User
"domain:s:" + Domain
"password 51:b:" + Pass
"port:i:" + Port
"screen mode id:i:1"
"desktopwidth:i:800"
"desktopheight:i:600"
"session bpp:i:32"
"auto connect:i:1"
"autoreconnection enabled:i:1"
"compression:i:1"
"keyboardhook:i:2"
"audiomode:i:2"
"redirectdrives:i:1"
"redirectprinters:i:1"
"redirectcomports:i:0"
"redirectsmartcards:i:0"
"displayconnectionbar:i:1"
"alternate shell:s:"
"shell working directory:s:"
"disable wallpaper:i:1"
"disable full window drag:i:1"
"disable menu anims:i:1"
"disable themes:i:1"
"bitmapcachepersistenable:i:1";

I am working on a c# program, part of it is generating its own .rdp file that will automatically connect with all information provided when it is generated.

When I try to launch the rdp file from command line I get that it's not a valid connection profile. If I double click it in windows it opens up, connects and logs in.
So I know the password hashes that its generating are correct. I don't understand why its not valid via command line.

Here is what's being generated in the .rdp file

"full address:s:" + IP
"username:s:" + User
"domain:s:" + Domain
"password 51:b:" + Pass
"port:i:" + Port
"screen mode id:i:1"
"desktopwidth:i:800"
"desktopheight:i:600"
"session bpp:i:32"
"auto connect:i:1"
"autoreconnection enabled:i:1"
"compression:i:1"
"keyboardhook:i:2"
"audiomode:i:2"
"redirectdrives:i:1"
"redirectprinters:i:1"
"redirectcomports:i:0"
"redirectsmartcards:i:0"
"displayconnectionbar:i:1"
"alternate shell:s:"
"shell working directory:s:"
"disable wallpaper:i:1"
"disable full window drag:i:1"
"disable menu anims:i:1"
"disable themes:i:1"
"bitmapcachepersistenable:i:1";

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苦笑流年记忆 2024-12-15 08:44:02

弄清楚了,我没有尝试通过 mstsc.exe file.rdp 启动它,而是启动 file.rdp 并且它工作得很好。

Figured it out, instead of trying to launch it via mstsc.exe file.rdp, I launch file.rdp instead and it works just fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文