Hi Eusebiu,
I managed to get everything up and running. I modified the VBS file to suit my needs:
Code: Select all
Function AskThenOpenURL(strPrompt)
Const msiMessageTypeUser = &H01000000
Dim ans
Set record = Session.Installer.CreateRecord(0)
record.StringData(0) = strPrompt
ans = Session.Message(msiMessageTypeUser + vbYesNo + vbQuestion, record)
If ans = vbYes Then
OpenURL("https://<sitename here>")
End If
End Function
Function OpenURL(strURL)
Set WshShell = CreateObject("WScript.Shell")
ret = WshShell.Run(strURL, 1, False)
End Function
Function LaunchCondition1Failed()
AskThenOpenURL("Some stuff is missing and needs to be installed first. Press Yes to proceed to the download site.")
' abort the installation
LaunchCondition1Failed = 3
End Function
Function LaunchCondition2Failed()
AskThenOpenURL("Some other stuff is missing and needs to be installed first. Press Yes to proceed to the download site.")
' abort the installation
LaunchCondition2Failed = 3
End Function
Then for both launch conditions I have I added a 'Launch attached file' Custom action, with Function: LaunchCondition1Failed.
This works like a charm!
I suspect I could probably add the text to message box text to a Property too, but for now this is fine!
Thanks for helping out,
Peter