AnneTheAgile
10 years agoContributor
cannot capture return code from command line in powershell OR batch
I have two trivial tests. zTdd1_Good provides green, passing. zTdd2_Fail provides a very simple red, failure. They both appear to work great, with the small exception that the script at the end of 2_F...
- 10 years agoIt should work when using Start-Process ... -PassThru -Wait:
PS C:\Users\helen> $tc = Start-Process 'C:\Program Files (x86)\SmartBear\TestComplete 10\Bin\TestComplete.exe' '"C:\Users\Public\Documents\TestComplete 10 Samples\Common\Test Log\TestLog.pjs" /run /exit' -PassThru -Wait
PS C:\Users\helen> $tc.ExitCode
2
Sorry I can't be more specific, I don't know PowerShell well.