Esempio n. 1
0
        public static void RemoteConnect(MSTSCConfig cfg)
        {
            AxMSTSCLib.AxMsRdpClient4 rdpc = new AxMSTSCLib.AxMsRdpClient4();

            rdpc.UserName = cfg.usrname;
            rdpc.AdvancedSettings2.ClearTextPassword = cfg.password;
            rdpc.Server = cfg.ServerIP;
            rdpc.AdvancedSettings2.RDPPort = int.Parse(cfg.PortNum);
            rdpc.Domain = ".";
            rdpc.Connect();

            //////AxMSTSCLib.AxMsTscAxNotSafeForScripting remoteserver = new AxMSTSCLib.AxMsTscAxNotSafeForScripting();

            ////////
            //////// RDP
            ////////
            //////remoteserver.UserName = cfg.usrname;

            //////remoteserver.Server = cfg.ServerIP;

            //////remoteserver.SecuredSettings.FullScreen = 1;
            //////remoteserver.AdvancedSettings.Compress = 1;

            //////MSTSCLib.IMsTscNonScriptable secured = (MSTSCLib.IMsTscNonScriptable)remoteserver.SecuredSettings;
            //////secured.ClearTextPassword = cfg.password;
            //////remoteserver.Connect();
        }
 public void Connect(Machine parMachine)
 {
     SetRdpClientProperties(parMachine);
     rdpc.Connect();
 }