How do I enable SecuredSettingsEnabled when using AxMsRdpClient to connect through RDP to a Cloud Instance?

自古美人都是妖i 提交于 2020-01-12 11:08:04

问题


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

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).

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.

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


回答1:


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;

The answer is answering an entirely different question. I misread the original question. See my last comment for details and a hint I found in the documentation. Sorry for any inconvenience!



来源:https://stackoverflow.com/questions/3634217/how-do-i-enable-securedsettingsenabled-when-using-axmsrdpclient-to-connect-throu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!