manifest ist eingebunden
Delphi-Quellcode:
.....
var OSVersionInfo: TOSVersionInfoEx;
.....
if (OsVersionInfo.dwMajorVersion = 10) and (OsVersionInfo.dwMinorVersion = 0) then
begin
if (OsVersionInfo.wProductType = VER_NT_WORKSTATION) then
begin
VersionString := 'Windows 10';
VersionTyp := wvWin10;
end
else
begin
VersionString := 'Windows Server 2016'; //Windows Server Technical Preview
VersionTyp := wvWinServer2016;
end;
end;
ausgelesen wird immer "Windows Server 2016"
habe aber die Windows 10 Pro
Auszug
MSDN
Code:
Windows 10 10.0* 10 0 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server Technical Preview 10.0* 10 0 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION
Windows 8.1 6.3* 6 3 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2012 R2 6.3* 6 3 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION
Windows 8 6.2 6 2 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2012 6.2 6 2 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION
.....
* For applications that have been manifested for Windows 8.1 or Windows 10. Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8
OS version value (6.2). To manifest your applications for Windows 8.1 or Windows 10, refer to Targeting your application for Windows.
hab ich irgendwas übersehen?
Edit:
OsVersionInfo.wProductType
liefert im übrigen 0 zurück insofern währe der Code ok nur Zeigt mein Windows
OsVersionInfo.wProductType falsch an