06-14-2019 10:09 AM
Hi
I am writing a teststand sequence that can publish a device's serial number into a text file or ini, (or publish it into the environment) and then having another teststand sequence to read that file or grab that environment variable.
I can't just combine the two teststand sequences because I have to run a program in the middle and I need the console output of that program on cmd (and potentially jenkins).
When I'm publishing it to environment variable using SetEnvironmentVariable(String, String, EnvironmentVariableTarget) function, I get a .net fatal error from teststand.
I am able to write into a text file from teststand using cmd, but I am not sure how to read from it in the 2nd program.
Please help ~ and thank you in advance 🙂
06-18-2019 09:03 AM
Have you checked out the method in this forum post for reading from text files in TestStand?
06-18-2019 09:08 AM
Hey, thanks for replying. I did check that out but it didn't seem to work for me. Fortunately I was able to pass in the variable into command prompt so all is well 🙂
Thanks again.