Ram
Ram

Reputation: 1517

How to select files to copy as per operating system version in Inno Setup?

I have built an installer with Inno setup. Recently it was found that some applications do not work in Windows XP. These applications work fine with Windows 7 onward. I need to copy files as per Windows version user is installing on and create program menu shortcuts accordingly. How can I implement this?

Upvotes: 2

Views: 293

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202594

All sections have MinVersion parameter, which you can use to limit a specific section entry to a specific minimal version of Windows:

[Files]
Source: "NeedsWin7.exe"; DestDir: "{app}"; MinVersion: 6.1

[Icons]
Name: "{group}\Needs Win 7"; Filename: "{app}\NeedsWin7.exe"; MinVersion: 6.1

Upvotes: 1

Related Questions