· Mar 9, 2022

How to get Script execution result in CMD caller


I am running a script from a CMD command line using : C:\CacheSys\Bin\cterm.exe /console=cn_iptcp:[23] myscript.SCR %CD%

The script should authorize something (or not) in the following lines of the GO.CMD


But How can i return an information from inside the script to the GO.CMD script ?

Any idea ?

Product version: Ensemble 2017.1
Discussion (2)0
Log in or sign up to continue

Not 100% sure of the requirement but if you write the output from the Cache code as if it was to the terminal then you can redirect the output to a file by appending >output.file but I don't think cterm is the way to do that as cterm will trap all the output itself, you would need to use csession for that.

You could just write to a file in your Cache code or run an external command/script from inside the Cache code?