I've go the same problem and here's what I found:
All my NT Workstations have the environment variable 'OS' set to "WINDOWS_NT"
So that I can control certain batch files....I've also put the OS=DOS in the autoexec.bat of each station running DOS (I only have 15, so it was an easy task) This allows the following to be used in batch file:
IF %OS%==Windows_NT GOTO NT
IF %OS%==DOS GOTO DOS
!the apps have not been tested for Win95/98
!OS_WARN.BAT just pops-up a 'WINDOWS 95/98 not supported' error
@CALL OS_WARN
GOTO END
:DOS
! put DOS commands here
GOTO END
:NT
! put NT commands here
:END
I've used this most commonly to support old code where reports depend on LPT1 being captured and pointing at the correct printer.
I try to stay online, to get better information.
I try to get away from the office once in a while..
But they KEEP... PULLING.. ME.. BACK.. IN!!!