操作系统和体系结构的自定义设置

问题描述 投票:0回答:2

已要求我在以下操作系统上运行安装程序:Windows Vista(仅x86)及更高版本(x86和x64)

为了限制整个安装程序在较旧的操作系统中运行,我在[Setup]部分中添加了与Windows Vista相对应的Minversion=0,6.0.6000

我想知道在Pascal脚本中是否可以像下面这样应用条件安装:

[Run]

Filename: "{tmp}\mysetup.exe"; Components: Install; MinVersion: 0,6.0.6000; Check: not Iswin64;

Filename: "{tmp}\mysetup.exe"; Components: Install; MinVersion: 0,6.1.7600;

这样,mysetup.exe应该只在Vista x86和所有更高的操作系统上运行。

inno-setup pascalscript
2个回答
1
投票
使用GetWindowsVersionGetWindowsVersion支持功能:

IsWin64


1
投票
我相信您正在寻找的是IsWin64它是所有支持参数的部分所支持的可选参数之一。

可在此处找到文档:if ((GetWindowsVersion >= $06000000) {Vista} and (not IsWin64)) or (GetWindowsVersion >= $06010000) {7} then begin // Install end;

© www.soinside.com 2019 - 2024. All rights reserved.