none
C# Open remote application locked within Windows form

    Pertanyaan

  • We're developing a C# Windows application, and one of the things we want to do with it is open a remote application inside our program. We can open a connection to the application's server using MSTSCLib, but to open our remote application either we open a remote desktop connection and open the program (which we don't want to do) or we open the remote application but in a separate window (which also isn't ideal).

    This is how we get the remote application to open in a new window; is there a way to open the remote application inside the RDP client?

    private AxMSTSCLib.AxMsRdpClient9NotSafeForScripting rdp;

    rdp.RemoteProgram2.RemoteProgramMode = true; rdp.OnConnected += (_1, _2) => { rdp.RemoteProgram2.ServerStartProgram(@"C:\Windows\System32\calc.exe", "", "%SYSTEMROOT%", true, "", false); }; rdp.Server = "servername.com"; rdp.UserName = "domain\\user"; rdp.AdvancedSettings7.PublicMode = false; rdp.AdvancedSettings7.ClearTextPassword = "password";

    rdp.Connect();

    Senin, 18 Januari 2016 16.36

Jawaban


  • Hi,

    We are not familiar with C#, here is a dedicated C# forum below for you.

    https://social.msdn.microsoft.com/Forums/en-us/home?forum=csharpgeneral

    is there a way to open the remote application inside the RDP client?

    As far as I know, when we open a application installed on remote host as either remote program via mstsc.exe or RemoteApp application via RD Web Access, it's actually treated as single remote session even though only one application is opened.

    Best Regards,
    Amy


    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Ditandai sebagai Jawaban oleh ptellerh Selasa, 19 Januari 2016 16.26
    Selasa, 19 Januari 2016 15.06
    Moderator

Semua Balasan


  • Hi,

    We are not familiar with C#, here is a dedicated C# forum below for you.

    https://social.msdn.microsoft.com/Forums/en-us/home?forum=csharpgeneral

    is there a way to open the remote application inside the RDP client?

    As far as I know, when we open a application installed on remote host as either remote program via mstsc.exe or RemoteApp application via RD Web Access, it's actually treated as single remote session even though only one application is opened.

    Best Regards,
    Amy


    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Ditandai sebagai Jawaban oleh ptellerh Selasa, 19 Januari 2016 16.26
    Selasa, 19 Januari 2016 15.06
    Moderator
  • Thanks, I'll try the forum you suggested.
    Selasa, 19 Januari 2016 16.26
  • we have tried same code as written by you. but after rdp connection. it automatically sign out from remote.

    we tried to connect from window10 to window10 rdp.  if we comment serverStartProgram. then application connects with remote desktop perfectly. 

    i am tring to open remote app using mstsclib. but not able to even open in new window. can you please help to solve this issue.

    Thanks in advance.

    Jumat, 13 Juli 2018 04.57