environment variable in cspro
-
- Posts: 44
- Joined: February 1st, 2018, 9:00 am
environment variable in cspro
I define the variable PCNUM as environment variable. I want to call it in cspro. Kindly guide me how can i do this in cspro.
-
- Posts: 1792
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: environment variable in cspro
The CSPro language does not have a way to access environment variables directly. However, you can create a DOS batch file with the following contents:
You can execute that batch file with execsystem, and then you can use the setfile/fileread functions to read that file, pcnum.txt, to get the contents of the environment variable.echo %PCNUM% > pcnum.txt