To check the settings in advance use the same structure as what Data linked:
Code:
config -get "dos ems" > nul
if %CONFIG%=="true"**...
if %CONFIG%=="false" ...
Replace the "..." with commands, a goto one if you want more than one command to be executed for each option. You wouldn't need the %CONFIG% variable to be created if the CONFIG command returned errorlevels, but it always returns 0. But still command prompt input is faster than menus. I won't start with C code, I'm not that bored right now. :P