I may be mis-understanding, but isn't this all you need:
quote:
IF "%SESSIONNAME%" == "" GOTO NotTS
IF NOT "%SESSIONNAME%" == "Console" GOTO END
:NotTS

IF NOT "%OS%" == "Windows_NT" GOTO WIN9X
for /f "Tokens=*" %%i in ('ver') DO (IF "%%i" == "Microsoft Windows XP [Version 5.1.2600]" GOTO XP)
IF NOT "%ALLUSERSPROFILE%" == "" GOTO WIN2K
IF "%OS%" == "Windows_NT" GOTO NT4
GOTO END
blah blah ...



[ 21. May 2003, 14:50: Message edited by: Richard H. ]