none
Should I use AxMsRdpClient6 or AxMSTSCLib.AxMsRdpClient8NotSafeForScripting RRS feed

  • Question

  • Hello,

    I'm trying to create windows form application that allows a user to connect to a virtual machine. I have implemented VCL 

    http://vcl.apache.org/ and users are allowed to download the rdp file but I would like to automate it so when they click connect(in vcl php interface. ( I believe I need to create a uri in registry so the browser knows to call my windows form  program to handle rdp protocol) RDP automatically connects them to the vm with the temporary password and username. I have some example code below. Eventually I'm going to parse the URI and pass those parameters. My question is what happens if the client is using Windows XP will the rdp control v8(AxMSTSCLib.AxMsRdpClient8NotSafeForScripting) work? what's the best approach for what I'm trying to accomplish. Any help in getting me started is appreciated. 

     private void button1_Click(object sender, EventArgs e)
            {
                
                Uri uri;
                uri = new Uri("rdp://username:password@10.10.11.63?forwardDisks=yes&forwardPrinters=yes&forwardSerial=yes&forwardAudio=yes&drawDesktop=yes&title=VCL%20Reservation&screenWidth=1280&screenHeight=1024");
                Console.WriteLine(uri.UserInfo);
                
                Console.WriteLine("Fully Escaped {0}", uri.UserEscaped ? "yes" : "no");
                rdp.Server = "10.10.11.63";
                rdp.UserName = "username";
    
                rdp.AdvancedSettings9.ClearTextPassword = "9TSDSw";
                rdp.AdvancedSettings9.RedirectDrives = true;
                rdp.Connect();
            }
    
            
        }

    Here is some more generated code.

    namespace VCLConnect
    {
        partial class RDPWindow
        {
            /// <summary>
            /// Required designer variable.
            /// </summary>
            private System.ComponentModel.IContainer components = null;
    
            /// <summary>
            /// Clean up any resources being used.
            /// </summary>
            /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
            protected override void Dispose(bool disposing)
            {
                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }
    
            #region Windows Form Designer generated code
    
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InitializeComponent()
            {
                System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RDPWindow));
                this.connect = new System.Windows.Forms.Button();
                this.rdp = new AxMSTSCLib.AxMsRdpClient8NotSafeForScripting();
                ((System.ComponentModel.ISupportInitialize)(this.rdp)).BeginInit();
                this.SuspendLayout();
                // 
                // connect
                // 
                this.connect.Location = new System.Drawing.Point(12, 596);
                this.connect.Name = "connect";
                this.connect.Size = new System.Drawing.Size(75, 23);
                this.connect.TabIndex = 1;
                this.connect.Text = "Connect";
                this.connect.UseVisualStyleBackColor = true;
                this.connect.Click += new System.EventHandler(this.button1_Click);
                // 
                // rdp
                // 
                this.rdp.Enabled = true;
                this.rdp.Location = new System.Drawing.Point(12, 12);
                this.rdp.Name = "rdp";
                this.rdp.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("rdp.OcxState")));
                this.rdp.Size = new System.Drawing.Size(1172, 578);
                this.rdp.TabIndex = 2;
                this.rdp.OnConnecting += new System.EventHandler(this.axMsRdpClient8NotSafeForScripting1_OnConnecting);
                // 
                // RDPWindow
                // 
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(1196, 631);
                this.Controls.Add(this.rdp);
                this.Controls.Add(this.connect);
                this.Name = "RDPWindow";
                this.Text = "Remote Desktop Connection";
                ((System.ComponentModel.ISupportInitialize)(this.rdp)).EndInit();
                this.ResumeLayout(false);
    
            }
    
            #endregion
    
            private System.Windows.Forms.Button connect;
            private AxMSTSCLib.AxMsRdpClient8NotSafeForScripting rdp;
        }

    Monday, January 6, 2014 1:57 PM

Answers

  • Hi,

    This forum is used to discuss the questions about the Windows Communication Foundation, Serialization, and Networking, and for your question, I think it should be related with the the remote desktop services, so please try to post it there, then you will get a good reply from the experts:

    #Remote Desktop Services Forums:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverTS .

    Best Regards,
    Amy Peng

                    

                    


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by coder128 Wednesday, January 8, 2014 1:04 PM
    Tuesday, January 7, 2014 6:08 AM
    Moderator