如何启用SecuredSettingsEnabled通过RDP使用AxMsRdpClient时,连接到云实例?连接到、实例、SecuredSettingsEnabled、RDP

2023-09-03 05:30:56 作者:你别皱眉我心疼

我在网上搜索高与低,只是不能环绕此我的头。

I've searched the web high and low and just cannot wrap my head around this.

基本上我想连接到Windows Server 2008实例,位于云和运行批处理文件(该文件位于实例)。

Basically I want to connect to a windows server 2008 instance, located in the cloud and run a batch file (which is located on the instance).

我使用的是AxMSTSCLib和MSTSCLib通过RDP连接到它,但不能得到批量运行。问题是SecuredSettingsEnabled没有启用,所以我禁区做这种手术。

I'm using the AxMSTSCLib and MSTSCLib to connect to it through RDP, but cannot get the batch running. The problem is SecuredSettingsEnabled isn't enabled so I am restricted doing this kind of operation.

我该如何正确连接,使SecuredSettingsEnabled设置为True,我可以运行我的批处理?

How do I connect properly, so that SecuredSettingsEnabled is set to True and I can run my batch?

推荐答案

您可以在AxMsTsc客户的AdvancedSettings财产转换为所需的设置界面。然后你就可以访问所有设置,都可以。通过这引起了启用SmartSizing在WPF我的标签式RDP会话工具。

You can cast the AdvancedSettings property of the AxMsTsc client to your desired settings interface. Then you can access all settings, which are available. Got through this to enable SmartSizing for my tabbed RDP Session Tool in WPF.


this.Client = new AxMsTscAxNotSafeForScripting();
IMsRdpClientAdvancedSettings7 settings = 
    (IMsRdpClientAdvancedSettings7)this.Client.AdvancedSettings;
settings.SmartSizing = true;