Determine Win7 or Win10

Hi, how can I during startup if the .exe is running Windows 7 or WIndows 10?

I would call the API function GetVersion. Here is a relevant link , or for more precise results, cascade the “IsWindows***” calls. The link to these calls is included in the linked page.

Calling the API as I suggested, especially with IsWindows** (there is one IsWindows per version, the result is boolean) is less overhead than methods proposed in that thread, and also distinguishes well between 8, 8.1 and 10.

Thank for helping and also pointing to info about MBS.
Christian has done ‘das schmutzige Teil’ for me with SystemInformationMBS.WinMajorVersion

Actually, this is the best of both worlds, since I believe Christian used the API described by Louis.