Question

I have a project that I'm working on that adds a layer of tracking and reporting to the mstsclib.dll. A new requirement is to allow shadow sessions so our IT folks can connect to a virtual machine and watch someone else work so we can troubleshoot what they are doing without needing to be in the room with them. I've looked through all of the AdvancedSettings and couldn't find anything that looked like it would help. The only thing that looked remotely related was

rdpClient.AdvancedSettings7.ConnectToAdministerServer = true

but that just connects to the console session and doesn't allow me to see what the user is doing.

Is there some setting that I am missing or is the solution more complicated than a single setting?

Here is the code for the rdpClient

public class AxMSRDPClient : AxMSTSCLib.AxMsRdpClient7
{
    public string _desiredResolution;
    public string _name;
    public int _id;
    public AxMSRDPClient()
        : base()
    {

    }

    protected override void WndProc(ref System.Windows.Forms.Message m)
    {
        //this corrects the Tabbing issue.
        if (m.Msg == 0x0021)
        {
            this.Focus();
        }
        base.WndProc(ref m);
    }
}

Almost all of the research into shadow sessions has just turned up how to do it from the mstsc.exe and not how it is done from the dll.

Was it helpful?

Solution

As far as I know, there is no way to shadow a session from the client end. On the server, you can call WTSStartRemoteControlSession (or the equivalent in the Cassia library: ITerminalServicesSession.StartRemoteControl) to shadow a session.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top