问题
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