Installation failed message

Topics: Archive - General
Jul 5, 2014 at 1:04 AM
wondering if we can display a prompt message if any installation failed?
Coordinator
Jul 5, 2014 at 9:24 PM
Yes, you could modify the Exit-Script function to show a prompt - see below. If you're going to modify the core toolkit, I'd suggest using the Toolkit Extensions, I haven't tested it but I think a modified Exit-Script function in the extension will override the one in the main toolkit.

ElseIf ($installSuccess -eq $false) {
    Write-Log "$installName $deploymentTypeName completed with exit code [$exitcode]."
# Display a message at the end of the install
Show-InstallationPrompt -Message "Installation failed." -ButtonRightText "Ok" -Icon InformationError -NoWait

    If ($exitCode -eq $configInstallationUIExitCode -or $exitCode -eq $configInstallationDeferExitCode) {
        $balloonText = "$deploymentTypeName $configBalloonTextFastRetry"
        Show-BalloonTip -BalloonTipIcon "Warning" -BalloonTipText "$balloonText"
    }
    Else {
        $balloonText = "$deploymentTypeName $configBalloonTextError"
        Show-BalloonTip -BalloonTipIcon "Error" -BalloonTipText "$balloonText"
    }
}