TWindowsVersion uses several Windows API calls and data structures for gathering information about the running version of Microsoft Windows®. To get the required information, you should use the following Windows API calls and data structures:

and much more. Read the MSDN Library carefully to find out everything about the Windows version.

The information passed to you through the functions above identifies the Windows version. You then have to use some more info to find out the difference between a Windows XP Professional or Home version, or a Windows Server 2008 and Windows Vista, which use the same major and minor verison number:

It's a pretty hard piece of work to find out all the possible versions of Microsoft Windows®. The table above will help you, but the code behind is much more work than you expect! I searched days in the internet to get all the information to put it all together in my component. You need mor time an lots of virtual machines to test the whole thing. So I'm really proud to present the finished component, which will be updated, when new versions of Windows come up. The component also finds out, if Windows started normally, in safe mode and other boot options.

TWindowsVersion:

properties of TWindowsVersion in theDelphi® Object Inspector at design time.

The grey rectangles in the pictureare no error but they should hide theWindows installation key.

TWindowsVersion (6.292 bytes)

Have a look at some screenshots to see the output of a sample program running on different Windows version in VMWare. Feel free to contact me to get the source code, if required.

You can download the component and also the component resource file below. Please link to my homepage in your copyright section if you use my component in your own applications!

Download info:

Download the component as a ZIP file:

mirror 1 is (file size: not determinable, last modified: not determinable)

mirror 2 is

mirror 3 is (file size: 21.56 kB, last modified: 21.09.2011)

Download the component as a RAR file:

mirror 1 is (file size: not determinable, last modified: not determinable)

mirror 2 is

mirror 3 is (file size: 19.90 kB, last modified: 21.09.2011)

Download the component resource file below:

mirror 1 is (file size: not determinable, last modified: not determinable)