inno 區分x86 x64 及 msi 靜默安裝
[Setup]
ArchitecturesInstallIn64BitMode=x64 ia64
[Files]
Source: "Bonjour.msi"; DestDir: "{tmp}"; Check: IsOtherArch
Source: "Bonjour64.msi"; DestDir: "{tmp}"; Check: not IsOtherArch
[Run]
Filename: msiexec.exe; Parameters: "-i""{tmp}/Bonjour.msi"" -qn"; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: "Installing Bonjour ..."; Check: IsOtherArch
Filename: msiexec.exe; Parameters: "-i""{tmp}/Bonjour64.msi"" -qn"; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: "Installing Bonjour ..."; Check: not IsOtherArch
[Code]
function IsX64: Boolean;
begin
Result := Is64BitInstallMode and (ProcessorArchitecture = paX64);
end;
function IsIA64: Boolean;
begin
Result := Is64BitInstallMode and (ProcessorArchitecture = paIA64);
end;
function IsOtherArch: Boolean;
begin
Result := not IsX64 and not IsIA64;
end;