Have requirement to detect windows 10 or greater version on install time. for that I have create following function.
It gives me 603 (AS VersionNT value) in windows 10 and windows 8.1. That is wrong.
Is there any other way to achieve this?
function BOOL isWindows10OrGreater()
STRING svWindowsValue;
NUMBER nWindowsValue;
NUMBER nBuffer;
begin
try
nBuffer = 256;
MsiGetProperty(ISMSI_HANDLE,"VersionNT",svWindowsValue,nBuffer);
StrToNum(nWindowsValue,svWindowsValue);
return (nWindowsValue >= 603);
catch
return FALSE;
endcatch;
end;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…