RDP ActiveX control in winform

G

Guest

i'm writing a simple c# program to start an RDP session from a windows form.

everything works fine except i can not determine how to cause the program to
allow me to execute a specific application on connection:

try
{
rdpSession.Server = myServer;
rdpSession.UserName = myUserName;
rdpSession.AdvancedSettings2.ClearTextPassword =
"************";
rdpSession.Domain = "myDomain";
rdpSession.AdvancedSettings2.ConnectToServerConsole = true;

if (rdpSession.SecuredSettingsEnabled >= 0 )
{
rdpSession.SecuredSettings.StartProgram =
"c:\\Windows\\notepad.exe";
rdpSession.SecuredSettings.WorkDir = "c:\\temp";
}
else
{
MessageBox.Show("Can't access the secured setting
(startprogram)");
}
rdpSession.Connect();
}


my understanding from the documentation of the control is that:

These restricted properties are accessed using the IMsTscSecuredSettings
interface and the IMsRdpClientSecuredSettings interface, and are available in
the following Internet Explorer URL security zones:
My Computer
Local Intranet
Trusted Sites

They are disabled in these zones:
Internet
Restricted Sites

when i examine the value at SecuredSettingsEnabled in the debugger it is
always -1 and therefore skips executing the startup application.

[it does start a desktop session in which i can execute the application -
which seems to circumvent the intended "security feature"??? - but perhaps i
am thinking wrongly???]

is there a way to cause the application to evaluate what Internet Explorer
URL security zones it is running in - the concept seems inappropriate and
inapplicable to running my executable? but again perhaps i am not thinking
correctly?

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top