We are switching our application to .Net4, but we still have customers on Windows XP SP2. So I need to make additionnal checks in the setup.
Making a popup message at the start of the setup to throw away XP SP2 users is pretty easy :
function InitializeSetup(): Boolean;
var
Version: TWindowsVersion;
begin
if IsModuleLoaded('monalbumphoto.exe') then begin
MsgBox(ExpandConstant('{cm:PleaseClose}'), mbError, MB_OK);
Result := false;
Abort;
end else begin
// check Windows version (to display a better error message for XP SP2 users)
GetWindowsVersionEx(Version);
if (Version.Major = 5) and (Version.Minor = 1) and (Version.ServicePackMajor < 3) then begin
MsgBox(ExpandConstant('{cm:WrongVersion}'), mbError, MB_OK);
Result := false;
Abort;
end else begin
Result := true;
end;
end;
end;
But now, the requirements have changed. I need to display a (kind of long) message, explaining that the user either have to upgrade to SP3, or download a legacy version of our app, with a link to it.
The easy way is to change the messagebox to use "YESNO" buttons (like in this question How to show a hyperlink in Inno Setup?) to automatically download the setup. But I want to go further.
I would like to display a custom wizard page with the explanation, and an embedded link. Another question (Inno Setup custom page) shows how to do it, but it looks like I can only create a page AFTER a specific page, and not BEFORE anything.
So, is it possible to display a custom wizard page BEFORE any other page, that cancels the whole installation ?
Thank you !