I'm making a validation in my Inno Setup installer to check whether or not a Microsoft update is installed on the machine, if not, I'm showing a simple message box telling the user that the update is required, this is the message code:
MsgBox(
'Your system requires an update supplied by Microsoft. ' +
'Please follow this link to install it: ' +
'http://www.microsoft.com/downloads/details.aspx?FamilyID=1B0BFB35-C252-43CC-8A2A-6A64D6AC4670&displaylang=en',
mbInformation, MB_OK);
I want to make the URL an hyperlink to the web page, but I haven't been able to figure it out how, it is possible in Inno Setup to add text as an hyperlink?
Thanks.
[Code] procedure ExitProcess(uExitCode: UINT); external '[email protected] stdcall'; var MainPage : TWizardPage; FolderToInstall : TEdit; InstallLocation : String; procedure CancelClick(Sender: TObject); begin if ExitSetupMsgBox then begin ExitProcess(0); end; end; procedure BrowseClick(Sender : TObject); var ...
As you know the application icon is built into the .exe file. The Inno Setup cannot modify the .exe files. And there's no other way to override the application icon by an external one. You have to edit the .exe file yourself, before building the installer.
Go to Menu, Project, then Compile to compile and create the setup file. This will create a complete installer. Run the Setup and your application will be installed correctly. Innosetup offers an awesome alternative to create great looking Installers for free.
The MsgBox()
function in Inno Setup is a wrapper for the standard Windows MessageBox()
function, which AFAIK doesn't support embedded links, so it's not possible to simply show the link there.
What you could do however is to notify the user that the update is required, and ask them whether to open the link in the default browser. Something like:
function InitializeSetup(): Boolean;
var
ErrCode: integer;
begin
if MsgBox('Your system requires an update supplied by Microsoft. Would you like to visit the download page now?', mbConfirmation, MB_YESNO) = IDYES
then begin
ShellExec('open', 'http://www.microsoft.com/downloads/details.aspx?FamilyID=1B0BFB35-C252-43CC-8A2A-6A64D6AC4670&displaylang=en',
'', '', SW_SHOW, ewNoWait, ErrCode);
end;
Result := False;
end;
This code will abort the installation, but you could create a custom page instead which checks whether the update has been installed, and otherwise prevents navigation to the next page. This would only work if the update can be installed without a system restart, though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With