I am not saying you should read directly from the environmental variable in your program. I am saying pass it as a command line argument. This has nothing to do with a graphical interface. If your program was setup correctly to read a variable from input you could call your program from your batch file like so.
MSL.exe %model%
I haven't programmed in C++ since I took my class in 1996 so I really can't recall how to do it but just about every Compiled and Interpreted programming Language can accept command line input in some fasion.