Skip to content

Commit

Permalink
add windows xp install check
Browse files Browse the repository at this point in the history
  • Loading branch information
derchrisuk committed Jul 5, 2017
1 parent 7880e1d commit 129dcb5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions windows-build/ayab.iss
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,24 @@ Name: "{commondesktop}\AYAB"; Filename: "{app}\ayab.exe"; Tasks: desktopicon

[Run]
Filename: "{app}\ayab.exe"; Description: "{cm:LaunchProgram,AYAB}"; Flags: nowait postinstall skipifsilent

[Code]
function InitializeSetup(): Boolean;
var
Version: TWindowsVersion;
begin
Result := True;
GetWindowsVersionEx(Version);
Log(Format('Product Type is %d', [Version.ProductType]));
Log(Format('Major is %d', [Version.Major]));
Log(Format('Minor is %d', [Version.Minor]));
if (Version.Major = 5) and (Version.Minor = 1) then
begin
MsgBox('This product cannot be installed on Windows XP.', mbError, MB_OK);
{ Abort installer }
Result := False;
end;
end;

0 comments on commit 129dcb5

Please sign in to comment.