Injecting root or global variables in .bat startup file

My .bat startup file cd "C:\Program Files\Derivative\TouchDesigner088\bin" start touchdesigner088.exe -gpu 0 -isMaster 1 "E:\MasterBuild\Master.toe?test=1" -test 1

tried some options but was hoping for a way to inject some base variables through bat startup file. Currently I’m loading config via text file but not too handy when there are multiple instances firing up.

Not ideal for your situation I guess, but you can set environment variables in your batch script before you call the .exe and read them using var() in Python. As far as I know there is no way to read arguments in touch.

Setting environment variables on before the call to the .exe is the way we do it in our projects too. If you are launching multiple .exes in the same .bat with different values, you can just set them to their next value before the next call to start the .exe.

set VAR=5