|
|
Comments and Discussions
|
|
 |

|
Great Job! But I think that don't show the correct text in Name Property if S.O. version is Microsoft Windows Server 2003 R2 x64, showing "Microsoft Windows Server 2003", without the "R2" text.
|
|
|
|

|
Note that all information returned by OSVERSIONINFOEX is nonsense if the user has right-cliked your application (EXE) and selected a compatibility mode.
Example:
If your operating system is Windows 7 and the user has chosen to run your application in compatibilty mode with Windows XP, the code above will tell that the operating system is Windows XP although it really is Windows 7 (or 8)! Windows will lie to you.
This makes the whole code useless if you have to know on which operating system you are REALLY running!
Be aware of this caveat!
Elmü
|
|
|
|

|
But using Systeminfo command we can perform the same activity
|
|
|
|

|
Sure, if you only need to check for your own sake.
The deal with my code is that you can use it in your programs and get the information programmatically so that you can e.g. enable/disable certain functionality based on what operating system the program is run on.
You can't do that with System Info.
Why can't I be applicable like John? - Me, April 2011 ----- Beidh ceol, caint agus craic againn - Seán Bán Breathnach ----- Da mihi sis crustum Etruscum cum omnibus in eo! ----- Just because a thing is new don’t mean that it’s better - Will Rogers, September 4, 1932
|
|
|
|

|
I've updated the source now and added the version numbers for Windows 6 & Windows Server 2012.
Personally, I don't have access to any systems running the mentioned operating systems, so I haven't actually been able to test it. I'm keeping my fingers crossed that it works.
I haven't found any information about Windows RT, so the code is not able to detect that.
Please note: I've kept the Visual Studio 2008 solution and compiled it for .NET runtime 2.0 to make it usable even for older projects. You can update the solution file and or the framework version yourself and recompile it in a matter of seconds if you need to do that!
Why can't I be applicable like John? - Me, April 2011 ----- Beidh ceol, caint agus craic againn - Seán Bán Breathnach ----- Da mihi sis crustum Etruscum cum omnibus in eo! ----- Just because a thing is new don’t mean that it’s better - Will Rogers, September 4, 1932
|
|
|
|
|

|
Great, so it works for Windows 8, but doesn't seem like it detects any edition. I'll look into that, because there was no info from Microsoft about that being changed.
Is your windows 8 version the Standard Windows 8 or is it Pro/enterprise[^]
Why can't I be applicable like John? - Me, April 2011 ----- Beidh ceol, caint agus craic againn - Seán Bán Breathnach ----- Da mihi sis crustum Etruscum cum omnibus in eo! ----- Just because a thing is new don’t mean that it’s better - Will Rogers, September 4, 1932
|
|
|
|

|
Johnny J. wrote: and added the version numbers for Windows 6 ...
You mean Windows 8 right?
The first step in the acquisition of wisdom is SILENCE, the second is LISTENING, the third MEMORY, the forth, PRACTICE and the fifth is TEACHING others!
|
|
|
|

|
Please could you update this like you promised...
Regards from Austria
Dietrich
|
|
|
|

|
OK, I took time off to fix this, so try to test now...
Why can't I be applicable like John? - Me, April 2011 ----- Beidh ceol, caint agus craic againn - Seán Bán Breathnach ----- Da mihi sis crustum Etruscum cum omnibus in eo! ----- Just because a thing is new don’t mean that it’s better - Will Rogers, September 4, 1932
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
Get the operating system version and edition, updated with Windows 8 & Windows Server 2012
| Type | Article |
| Licence | CPOL |
| First Posted | 15 Apr 2010 |
| Views | 66,061 |
| Downloads | 5,387 |
| Bookmarked | 77 times |
|
|