Forum Discussion

carl_nagle's avatar
carl_nagle
New Contributor
11 years ago

TC/TE VBScript Runtime Version information

Any info on the following scenario would be appreciated. We need our VBScript libraries to be able to know and route according to the version of TestComplete or TestExecute running.  Are there ...
  • AlexKaras's avatar
    11 years ago
    Hi Carl,



    What about this code snippet (untested, off top of my head):

    Set p = Sys.WaitProcess("TestComplete", 500)

    If (p.Exists) Then _

      Call Log.Message("TC detected")



    Set p = Sys.WaitProcess("TestExecute", 500)

    If (p.Exists) Then _

      Call Log.Message("TE detected")



    If (Not p.Exists) Then _

      Call Log.Warning("Neither TC nor TE was detected")



    iVerMajor = aqConvert.VarToInt(p.FileVersionInfo.MajorPart)

    Call Log.Message(aqString.Format("Major version # is: %i", iVerMajor))