[Code]
function IsXP32(): Boolean;
var
Version:TWindowsVersion;
S:String;
begin
GetWindowsVersionEx(Version);
S:= '主版本号:' + IntToStr( Version.Major ) + #13#10;
S:= S+'副版本号:' + IntToStr( Version.Minor ) +#13#10;
S:= S+'构建号:' + IntToStr( Version.Build ) +#13#10;
S:= S+'服务包主版本号:' + IntToStr( Version.ServicePackMajor ) +#13#10;
S:= S+'服务包副版本号:' + IntToStr( Version.ServicePackMinor ) +#13#10;
if Version.NTPlatform then
Begin
S:= S+'基于 NT 平台则:True' +#13#10;
end;
if not Version.NTPlatform then
Begin
S:= S+'基于 NT 平台则:False' +#13#10;
end;
if Version.ProductType = VER_NT_WORKSTATION then
Begin
S:= S+'产品类型:Work Station(工作站)' +#13#10;
end;
if Version.ProductType = VER_NT_DOMAIN_CONTROLLER then
Begin
S:= S+'产品类型:Domain Controller(域控制器)' +#13#10;
end;
if Version.ProductType = VER_NT_SERVER then
Begin
S:= S+'产品类型:Server(服务器)' +#13#10;
end;
if Version.SuiteMask and VER_SUITE_BACKOFFICE <> 0 then
Begin
S:= S+'安装的产品组件:Microsoft BackOffice 组件' +#13#10;
end;
if Version.SuiteMask and VER_SUITE_BLADE <> 0 then
Begin
S:= S+'安装的产品组件:Blade(设置在网络版的 Windows Server 2003)' +#13#10;
end;
if Version.SuiteMask and VER_SUITE_DATACENTER <> 0 then
Begin
S:= S+'安装的产品组件:Windows 2000数据中心服务器' +#13#10;
end;
if Version.SuiteMask and VER_SUITE_ENTERPRISE <> 0 then
Begin
S:= S+'安装的产品组件:Windows 2000高级服务器' +#13#10;
end;
if Version.SuiteMask and VER_SUITE_EMBEDDEDNT <> 0 then
Begin
S:= S+'安装的产品组件:Windows XP Embedded' +#13#10;
end;
if Version.SuiteMask and VER_SUITE_PERSONAL <> 0 then
Begin
S:= S+'安装的产品组件:Personal(家庭版的 Windows)' +#13#10;
end;
if Version.SuiteMask and VER_SUITE_SINGLEUSERTS <> 0 then
Begin
S:= S+'安装的产品组件:Single User TS(支持远程桌面,但只支持一个交互式会话)' +#13#10;
end;
if Version.SuiteMask and VER_SUITE_SMALLBUSINESS <> 0 then
Begin
S:= S+'安装的产品组件:Microsoft小型企业服务器' +#13#10;
end;
if Version.SuiteMask and VER_SUITE_SMALLBUSINESS_RESTRICTED <> 0 then
Begin
S:= S+'安装的产品组件:Microsoft小型企业服务器随限制性客户端许可证一起安装。' +#13#10;
end;
if Version.SuiteMask and VER_SUITE_TERMINAL <> 0 then
Begin
S:= S+'安装的产品组件:终端服务' +#13#10;
end;
S:= S+'产品类型:' + IntToStr( Version.ProductType ) +#13#10;
S:= S+'安装的产品组件:' + IntToStr( Version.SuiteMask ) +#13#10;
MsgBox(S,mbInformation,MB_OK);
if (Version.Major = 5) and (not Is64BitInstallMode) then
begin
Result :=True;
Exit;
end;
Result :=False;
end;
【Inno Setup】判别系统版本
最新推荐文章于 2024-08-09 11:49:21 发布