Set Environment Variables on launch via .bat file

I need to set a simple Environment variable via a .bat script.
I am using GPU Affinity to target a specific GPU on startup. Following this
Using Multiple Graphic Cards | Derivative?

So for example my .bat file might be

set APPPATH=C:\Program Files\Derivative\TouchDesigner\bin
start “%APPPATH%” “%APPPATH%\TouchDesigner” -gpuformonitor 0 C:/Projects/Playback.toe

But in addition I need to pass an environment variable, could be a simple boolean flag, that I can read in TouchDesigner on launch.
This is because I am launching the same .toe twice, each will target a different GPU and each will have a different ‘state’ or ‘mode’.

I’ve read Matthew Ragan’s old blog post on this subject but still confused. Some reference to variables %0-%9
but have no idea how to implement.