Forum Discussion

m_essaid's avatar
m_essaid
Valued Contributor
7 years ago

Could we know if the test is executed in a RDP ?

Hi,

 

I would like to have a boolean which indicates if I am connected through remote desktop or not.

 

Is that possible ?

 

Thank you,

 

Mehdi

7 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    Hi,

     

    Not sure what you are asking, Do you want to have a Boolean value which will say whether RDP instance is running in the current machine?

    • m_essaid's avatar
      m_essaid
      Valued Contributor

      hi Shankar,

      yes, is there a way to know that ?

      thanks, Mehdi

      • shankar_r's avatar
        shankar_r
        Community Hero

        Hi,

         

        I know we can check whether the RDP application is opened in current machine using below code,

         

        function isRDPRunning()
        {
               return Sys.Process("mstsc").Exists;
        }

        Not sure, How to check whether that RDP is connected to any VM or server.

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    Hi guys,

     

    thank you very much for your answers.

     

    but I may haven't be clear at first... but you helped be understand my own problem.

     

    I have a small exe that I have to launch before and after several test items. I need this exe to be launched in an administrator mode in RDP.

     

    so if I don't abuseof your kindness could you say to me if there is any way to launch this small exe as a testedApp with high privileges (admin mode) ?

     

    thank you...

     

    this exe is not tested but installs tools for the tested one.