none
Send Ctrl+Alt+Del command to RDP ActiveX

    Question

  • Hi all,

     

    I am creating a custom version of VMCONNECT.EXE to connect users to Hyper-V guest VMs.  I've got it all working, except when the user connects to a machine that isn't logged in.  I cannot send the Ctrl+Alt+Del command to the RDP ActiveX control.

     

    Current code as follows: 

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;

    namespace RDPTest
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }

            
            private void button1_Click(object sender, EventArgs e)
            {
                // MessageBox.Show("Clicked");

                //specify the server the VM is running on
                axMsRdpClient8NotSafeForScripting1.Server = "x.x.x.x";

                //enable relative mouse mode and smart sizing
                axMsRdpClient8NotSafeForScripting1.AdvancedSettings7.RelativeMouseMode = true;
                axMsRdpClient8NotSafeForScripting1.AdvancedSettings7.SmartSizing = true;

                axMsRdpClient8NotSafeForScripting1.AdvancedSettings8.DisableCtrlAltDel = -1;

                //specify the authentication service - this is required and set the authentication level
                axMsRdpClient8NotSafeForScripting1.AdvancedSettings7.AuthenticationServiceClass =
                    "Microsoft Virtual Console Service";
                axMsRdpClient8NotSafeForScripting1.AdvancedSettings6.AuthenticationLevel = 0;

                //retrieve the activeX control and enable CredSSP and disable NegotiateSecurity
                MSTSCLib.IMsRdpClientNonScriptable3 Ocx =
                    (MSTSCLib.IMsRdpClientNonScriptable3)axMsRdpClient8NotSafeForScripting1.GetOcx();
                Ocx.EnableCredSspSupport = true;
                Ocx.NegotiateSecurityLayer = false;

                //retrieve the activeX control and disable CredentialsDelegation
                MSTSCLib.IMsRdpExtendedSettings rdpExtendedSettings =
                    (MSTSCLib.IMsRdpExtendedSettings)axMsRdpClient8NotSafeForScripting1.GetOcx();
                object True = true;
                rdpExtendedSettings.set_Property("DisableCredentialsDelegation", ref True);

                //set the RDPPort and set the PCB string to the VM's ID
                axMsRdpClient8NotSafeForScripting1.AdvancedSettings2.RDPPort = 2179;
                axMsRdpClient8NotSafeForScripting1.AdvancedSettings7.PCB = "MACHINE GUID";    

                //connect to the VM
                axMsRdpClient8NotSafeForScripting1.Connect();


            }

        }
    }

    As you can see there I have tried to use the "DisableCtrlAltDel" command, however this doesn't seem to do anything.

    Any help would be much appreciated.

    Thanks
    Chris

     
    Thursday, December 12, 2013 3:44 PM

Answers

  • Hi chriwall,

    I am not familar about your issue, but as far as I know that a slightly different keyboard shortcuts are used when applied to a remote desktop session window. If you want to send ctrl+alt+del command to remote desktop session windows, please ctrl+alt+end.

    The following articles are for your reference.

    How to Press and Send Ctrl-Alt-Del in Remote Desktop Connection Window:

    http://www.mydigitallife.info/how-to-press-and-send-ctrl-alt-del-in-remote-desktop-connection-window/


    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.

    Friday, December 13, 2013 2:15 AM