0

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.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Meleena
  • 89
  • 2
  • 8
  • Yes, there is just the [`MinVersion`](http://www.jrsoftware.org/ishelp/index.php?topic=commonparams&anchor=MinVersion) parameter common for all sections using parameters. – TLama May 27 '15 at 14:23
  • 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 May 28 '15 at 05:38
  • @Martin: Thanks for your reply I was in doubt upon commands to be used. Meleena – Meleena May 28 '15 at 17:45

2 Answers2

1

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

Sk93
  • 3,676
  • 3
  • 37
  • 67
1

Use GetWindowsVersion and IsWin64 support functions:

if ((GetWindowsVersion >= $06000000) {Vista} and (not IsWin64)) or
   (GetWindowsVersion >= $06010000) {7} then
begin
  // Install
end;
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992