Forum Discussion

shankar_r's avatar
shankar_r
Community Hero
8 years ago

Is there any way to know TestComplete/TestExecute running in 64 bit or 32 Bit in scripts?

Do we have option in scripts to get TestComplete/TestExecute running in 64 bit or 32 Bit?   something like is64Bit()
  • shankar_r's avatar
    shankar_r
    8 years ago

    Now, I gotta multiple ways of doing this scenario right. I'm currently having below function.

     

    function is64BitClient()
    {
          var tcprocess = Sys.WaitProcess("Test*te", 0);
          
          if(tcprocess.Exists)
          {
                if(tcprocess.ProcessType == "x64")
                {
                      return true;
                }
                else if(tcprocess.ProcessType == "x86")
                {
                      return false;
                }
                else
                {
                      throw "Not able to grab the process type";
                }
          }
          throw "Not able to find the TestComplete/TestExecute process";   
    }

    Thanks everyone for your insights on this.