我正在研究nsis安装程序.为此,我想知道CurrentVersion每个操作系统的价值
HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion"
Run Code Online (Sandbox Code Playgroud)
例如:我的机器上安装了Windows 7专业版,CurrentVersion价值是6.1.
自Windows 98以来,任何人都可以为所有Windows操作系统列出它吗?
要求在安装时检测Windows 10或更高版本。为此,我创建了以下功能。
它在Windows 10和Windows 8.1中给我603(AS VersionNT值)。那是错的。
还有其他方法可以做到这一点吗?
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;
Run Code Online (Sandbox Code Playgroud)