Yes. In addition to the other good suggestions, you can run my osver.exe
utility with the -s switch:
osver -s
This also returns the service pack level as an ERRORLEVEL for use in
scripts if needed. Note that it only runs on the local machine, unless you
use psexec from www.sysinternals.com.