Get Exe version number from Host
Hi All,
Currently working on a distributed setup where I have a server that runs test execute at a scheduled time to execute the project suite. The project suite includes a list of jobs that are run accross a couple of Hosts.
At the end of the test run, I am saving the results file to a location & renaming it with the version\build of the exe run on the host(s). I have tried using the Sys.Process.FileVersionInfo (see code below) but this wont work because the exe (MyExe.exe) is not present on the Server where the test run is kicked off. Therefore I get errors that the process was not found. I have also investigated using various variables (Project, ProjectSuite & NetworkSuite) but these dont seem to work for me either.
Sub LogFinalResultsAndEmail
'This Routine will Export the Results Log to the Folder below & will also Rename the log to the build version.
'It will then email these Results to the specified email addresses.
sFolder = "\\Server1\TestComplete\Project1\Results\"
aqFileSystem.CreateFolder(sFolder)
FileName = sFolder & "\Build_" &Sys.Process("MyExe").FileVersionInfo & "\MyExe_Build_"& Sys.Process("MyExe").FileVersionInfo & "_" & Sys.HostName & ".mht"
Log.SaveResultsAs FileName, 2
Call SendEmail ("relay@email.com", "myemail@email.com","Test Results: MyExe Build Version "& Sys.Process("MyExe").FileVersionInfo,"Full Test Results for MyExe Build Version "& Sys.Process("MyExe").FileVersionInfo& " are available by clicking the following link. The results file (.mht) opens in Internet Explorer. " & "<a href="&FileName&"> Test Results</a> "&". Please do not reply to this message. This email is an automated notification, which is unable to receive replies.")
End Sub
So my question is how can I get access to the exe version details from the remote host in order to name the results file accordingly. Any help greatly appreciated.
Thanks,
Jimmy