cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
byaron
Level 2

I way to distinguish between 2008R2 and windows7

Hi
I need a way to distinguish between windows 2008R2 and windows 7.
seems like SYSINFO is not helping me.
thanks.
Labels (1)
0 Kudos
(1) Reply
rcurro
Level 3

I used the SYSINFO.nOSMajor and SYSINFO.nOSMinor to distinguish Server 2008. I believe if you add the nOSProductType you can distinguish Windows 7.

Windows Server 2008 R2
nOSMajor = 6
nOsMinor = 1
nOSProductType = 3

Windows 7
nOSMajor = 6
nOsMinor = 1
nOSProductType = 1

Here's an article explaining how to Determine Windows Version and Edition
http://www.codeguru.com/cpp/w-p/system/systeminformation/article.php/c8973

Robert
0 Kudos