mmletzko,

No need to shell out or run another program to locate Windows 2000. This batch file should do the trick.

code:
@ECHO OFF
if not "%ALLUSERSPROFILE%" == "" goto found
GOTO END

:FOUND
ECHO Found Windows 2000
REM Or what ever command you want to run.
GOTO END

:END


The environment variable %ALLUSERSPROFILE% should not exist on any of the other Windows OS types.

Martijn,

Pipe normally means to redirect the output to another program to perform another task with it. However, using this batch file it is not needed.

HTH...

[ 30 October 2001: Message edited by: NTDOC ]