I am currently using Microsoft Terminal Services Client what works amazingly and does what i want it to do. But i have ran into a small issue what is proving to be difficult to fix. I am trying to connect to the rdp and then constantly scan if a file exist. But when i do the for loop (After it call the rdp to connect) it doesn't connect. Here is my code:
axMsTscAxNotSafeForScripting1.Server = "0.0.0.0";
axMsTscAxNotSafeForScripting1.UserName = "Test";
IMsTscNonScriptable secured = (IMsTscNonScriptable)axMsTscAxNotSafeForScripting1.GetOcx();
secured.ClearTextPassword = "c";
axMsTscAxNotSafeForScripting1.Connect();
Thread.Sleep(2000);
for(; ; )
{
if (File.Exists(b + "t.txt"))
{
MessageBox.Show("File Exists");
}
}