Finding current OS Version
-
Hi, I want to find my pc's current os version. I am using ::GetVersionEx(OSVERSIONINFO &osver) API to know. But the problem is Windows 7 and Windows Server 2008 R2 have same version number i.e., 6.1 How can i find what is the exact version (Windows 7 or Server 2008 R2)? Thanks in advance, Regards msr
-
Hi, I want to find my pc's current os version. I am using ::GetVersionEx(OSVERSIONINFO &osver) API to know. But the problem is Windows 7 and Windows Server 2008 R2 have same version number i.e., 6.1 How can i find what is the exact version (Windows 7 or Server 2008 R2)? Thanks in advance, Regards msr
Use OSVERSIONINFOEX, and check in MSDN Link ->[^] Windows 7 6.1 6 1 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION Windows Server 2008 R2 6.1 6 1 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION Version of both Windows 7 and Windows Server 2008 R2 is same but wProductType is different. I Think it will help you :)
I believe in LOVE AT FIRST SIGHT... Bcoz I have loved my Mother... even since I opened my eyes...(ICAN)
-
Hi, I want to find my pc's current os version. I am using ::GetVersionEx(OSVERSIONINFO &osver) API to know. But the problem is Windows 7 and Windows Server 2008 R2 have same version number i.e., 6.1 How can i find what is the exact version (Windows 7 or Server 2008 R2)? Thanks in advance, Regards msr
From the remarks section of OSVERSIONINFO Structure[^]:
Operating system
Version no.
dwMajorVersion
dwMinorVersion
Other
Windows 7
6.1
6
1
OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2008 R2
6.1
6
1
OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION
So, you just need to check for the
wProductType
member of theOSVERSIONINFOEX
structure that you're passing in to the API."Real men drive manual transmission" - Rajesh.
-
Use OSVERSIONINFOEX, and check in MSDN Link ->[^] Windows 7 6.1 6 1 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION Windows Server 2008 R2 6.1 6 1 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION Version of both Windows 7 and Windows Server 2008 R2 is same but wProductType is different. I Think it will help you :)
I believe in LOVE AT FIRST SIGHT... Bcoz I have loved my Mother... even since I opened my eyes...(ICAN)
Take a 5, you gave the correct answer as well (albeit with no proper emphasis on formatting). :)
"Real men drive manual transmission" - Rajesh.
-
Take a 5, you gave the correct answer as well (albeit with no proper emphasis on formatting). :)
"Real men drive manual transmission" - Rajesh.
-
From the remarks section of OSVERSIONINFO Structure[^]:
Operating system
Version no.
dwMajorVersion
dwMinorVersion
Other
Windows 7
6.1
6
1
OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2008 R2
6.1
6
1
OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION
So, you just need to check for the
wProductType
member of theOSVERSIONINFOEX
structure that you're passing in to the API."Real men drive manual transmission" - Rajesh.
Shilpi Boosar and Rajesh, thank you so much. Regards msr
modified on Saturday, February 12, 2011 12:10 AM
-
From the remarks section of OSVERSIONINFO Structure[^]:
Operating system
Version no.
dwMajorVersion
dwMinorVersion
Other
Windows 7
6.1
6
1
OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2008 R2
6.1
6
1
OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION
So, you just need to check for the
wProductType
member of theOSVERSIONINFOEX
structure that you're passing in to the API."Real men drive manual transmission" - Rajesh.
Rajesh R Subramanian wrote:
a lot of table information
OK, now you're just showing off! Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!