0
votes

I have been asked to have a setup procedure running in the following operating systems:
Windows Vista (only x86) and higher (both x86 and x64)

In order to restrict whole setup from running in older operating systems I added into [Setup] section the Minversion=0,6.0.6000 that corresponds to Windows Vista.

I wonder if in Pascal scripting it is possible to apply a conditional installation like the following:

[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;

This way mysetup.exe should run only on Vista x86 and on all higher operating systems.

2
Yes, there is just the MinVersion parameter common for all sections using parameters. - TLama
You question is bit confusing. Your [Run] code does already what you ask for (run only on Vista x86 and on all higher operating systems). What do you need the Pascal scripting for? - Martin Prikryl
@Martin: Thanks for your reply I was in doubt upon commands to be used. Meleena - Meleena

2 Answers

1
votes

I believe what you are looking for is MinVersion It's one of the optional parameters that are supported on all sections that support parameters.

Documentation can be found here: http://www.jrsoftware.org/ishelp/index.php?topic=commonparams&anchor=MinVersion

1
votes

Use GetWindowsVersion and IsWin64 support functions:

if ((GetWindowsVersion >= $06000000) {Vista} and (not IsWin64)) or
   (GetWindowsVersion >= $06010000) {7} then
begin
  // Install
end;