gpt4 book ai didi

C#|将远程桌面作为进程启动+在文本框中放置文本

转载 作者:太空宇宙 更新时间:2023-11-03 18:43:03 24 4
gpt4 key购买 nike

好吧,这个问题的标题有点愚蠢,但我会非常非常简单地解释它。

在我的代码中,我正在构建一个远程 deskop.exe

像这样:

Process rtc;
rtc = Process.Start(@"C:\Windows\System32\mstsc.exe");

现在,事情是这样的。当远程桌面出现(它的工作)时,我想知道如何在连接的文本框中输入名称。

所以当 Remote 启动时,conntion 名称将在那里,或者一个 ip。

它甚至是posibale吗?

最佳答案

mstsc 有很多你可以传递给它的命令行参数:

MSTSC [<connection file>] [/v:<server[:port]>] [/admin] [/f[ullscreen]] [/w:<width> /h:<height>] [/public] | [/span] [/multimon] [/migrate] [/edit "connection file"]

"connection file" -- Specifies the name of an .RDP file for the connection.

/v:<server[:port]> -- Specifies the remote computer to which you want to connect.

/admin -- Connects you to the session for administering a server.

/f -- Starts Remote Desktop in full-screen mode.

/w:<width> -- Specifies the width of the Remote Desktop window.

/h:<height> -- Specifies the height of the Remote Desktop window.

/public -- Runs Remote Desktop in public mode.

/span -- Matches the remote desktop width and height with the local virtual desktop, spanning across multiple monitors, if necessary. To span across monitors, the monitors must be arranged to form a rectangle.

/multimon -- Configures the remote desktop session monitor layout to be identical to the current client-side configuration.

/edit -- Opens the specified .RDP connection file for editing.

/migrate -- Migrates legacy connection files that were created with Client Connection Manager to new .RDP connection files.

关于C#|将远程桌面作为进程启动+在文本框中放置文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7012667/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com