title: Find out windows version from non-privileged user command line
body: <p>I need a way to find out what version of windows I'm running in using simple command line tools (no powershell).  I need it to work from a non-privileged user, and I need to be able to parse out the difference between Windows XP, Vista, server 2008, and 7.  I'm currently using:
  <code>wmic os get Caption</code> but that fails when the user doesn't have permissions to run wmic.</p>
  
  <p><strong>Update:</strong>
  To clarify, I need this command to not break with different service pack levels, etc. which probably rules out parsing a specific version number.  Also if you look at <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832%28v=vs.85%29.aspx" rel="noreferrer">this list</a> of windows versions, you'll see that the numbers reported on Windows 7 and server 2008 r2 are the same.</p>