Advertisement
Guest User

Untitled

a guest
Mar 4th, 2016
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. using System;
  2. using System.Threading;
  3. using MSTSCLib;
  4.  
  5. namespace test
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. try {
  12. var rdp = new MSTSCLib.MsRdpClient8();
  13.  
  14. rdp.Server = "6.6.16.6";// host.Text;
  15. rdp.UserName = "admin"; // login.Text;
  16. rdp.AdvancedSettings2.ClearTextPassword = "admin";
  17. rdp.AdvancedSettings7.EnableCredSspSupport = true;
  18.  
  19. rdp.Connect();
  20.  
  21.  
  22.  
  23. if (rdp.Connected.ToString() == "1" )
  24. {
  25.  
  26. rdp.Disconnect();
  27. Console.WriteLine("good");
  28. Console.ReadKey();
  29. }
  30.  
  31. else
  32. {
  33. Console.WriteLine("error");
  34. Console.ReadKey();
  35. }
  36.  
  37. }
  38. catch (Exception)
  39. {
  40. // Console.ReadKey();
  41. }
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement