This is a simplified example with modified variable names of what I want to do. Also for simplicity sake, I am showing the command line version rather than the bat file ver
Within a batch file, use two %%s, e.g.:
%%
set foo=1 echo %%foo%%
...echoes "%foo%", not "1". I'm not aware of a way to disable it in immediate mode (e.g., not in a batch file).