Brilliant - I did try and use the FIND command but couldnt figure out how to use the result ie if string not found set the error code. Obviously (now

I wass missing the pipe. Thanks for your help Joc most kind!!
This is how I got around it and following using your method. I am using this to change proxy settings to point to a pac file and it works beautifully!
**********************************************************
My way;
@echo off
net use /d q:
net use q: \\wyg1\netlogon
cd q:
if exist "c:\documents and settings" goto windows2000chk
if exist "c:\winnt" goto nt
if exist "c:\windows\defrag.exe" goto 95
:windows2000chk
if "%os%"=="Windows_NT" goto windows2000
:windows2000
echo Your OS is win2k Configuring Proxy Settings
regedit.exe /s q:\NT5.reg
goto end
:nt
echo Your OS is Winnt Configuring Proxy Settings
regedit.exe /s q:\NT.reg
goto end
:95
echo your OS is Win95
Configuring Proxy Settings
regedit.exe /s q:\95.reg
goto end
:end
net use /d q:
*****************************************************
*****************************************************
Your way
@echo off
net use /d q:
net use q: \\wyg1\netlogon
cd q:
ver |FIND "Windows 2000" > nul
if not errorlevel=1 goto win2K
ver |FIND "Windows XP" > nul
if not errorlevel=1 goto win2k
ver |FIND "Windows NT" > nul
if not errorlevel=1 goto nt
ver |FIND "Windows 9" > nul
if not errorlevel=1 goto 9x
:win2k
echo Your OS is win2k Configuring Proxy Settings
regedit.exe /s q:\NT5.reg
goto end
:nt
echo Your OS is Winnt Configuring Proxy Settings
regedit.exe /s q:\NT.reg
goto end
:9x
echo your OS is Win95
Configuring Proxy Settings
regedit.exe /s q:\95.reg
goto end
:end
net use /d q:
******************************************************
Again thanks a million!!