[python-win32] GetWindowsVersion on Longhorn

Tim Roberts timr at probo.com
Fri Jan 23 03:14:41 CET 2009


Matt Herbert (matherbe) wrote:
> Just wondering if there is a way to differentiate Windows Server 2008
> from Windows Vista? All the normal methods I would use aren't cutting
> it. For instance, sys.getwindowsversion() and platform.uname() are
> returning exactly the same thing for Vista and Windows 2008.
>   

Yes, this is a common issue.  The fact is that Vista SP1 is exactly the
same code as Windows Server 2008.  There is no difference.  Thus, for
the most part you shouldn't care.

You can dig the real system name from the registry. 
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion should have what you need.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list