inno setup判断Windows系统版本

Windows 版本

5.0.2195 Windows 2000
5.1.2600 Windows XP
或 Windows XP 64-位 Edition 版本 2002(Itanium)
5.2.3790 Windows Server 2003
或 Windows XP x64 版本(AMD64/EM64T)
或 Windows XP 64-位 Edition 版本(Itanium)
6.0.6000 Windows Vista
6.0.6001 Windows Vista with Service Pack 1
或 Windows Server 2008
6.1.7600 Windows 7
或 Windows Server 2008 R2
6.1.7601 Windows 7 with Service Pack 1
或 Windows Server 2008 R2 with Service Pack 1
6.2.9200 Windows 8
或 Windows Server 2012
6.3.9200 Windows 8.1
或 Windows Server 2012 R2
6.3.9600 Windows 8.1 with Update 1
10.0.10240 Windows 10

请注意,这里通常不需要指定构建号(比如你对于 Windows 8,可以简单地使用“6.2”)。

判断方法

判断系统版本如果在xp或xp以下,程序将自动退出。

  1. function InitializeSetup: Boolean;
  2. var
  3.     Version: TWindowsVersion;
  4. begin
  5.     GetWindowsVersionEx(Version);
  6.     if (Version.Major <6) then
  7.         begin
  8.             SuppressibleMsgBox(‘该安装程序程序不支持在window xp 及xp以下版本运行。’,
  9.             mbCriticalError, MB_OK, MB_OK);
  10.         Result := False;
  11.         Exit;
  12.     end;
  13. Result := True;
  14. end;
------本页内容已结束,喜欢请分享------

感谢您的来访,获取更多精彩文章请收藏本站。

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容