How would you like the results displayed? On the screen or a txt file?
If you were to have the results displayed on the screen, try something like this.
rem winver will tell windows to display the current OS version along with build and SP information. A window is activated showing you a graphical interface
If you want to have the results saved to a file try this.
ver > version.txt
rem ver will tell the script to display the current OS version , > tells the script to send the results to the "version.txt" file (it will create this in the root directory by default) this is a variable so you can change the name of the file name or location if you'd like.