Show-InstallationPrompt - Buttons - catching results

Hello,

first of all, thank you for this great tool, it saved me a huge amount of time for past half year :slight_smile:

My question is , i have software which has 2 parts ( second part is optional ) , i want create install script with Show-InstallationPrompt at the beggining just after installwelcomeprompt, with 2 buttons with options “Install All” and “Install only part 1”

Can you please help me , or push me?
How can i define what will happen when user clicks on button 1 or button 2 ? Cannot find it anywhere, or im searching it badly :slight_smile:

Thanks for any advice, solution , push :slight_smile:

Regards
T. Kromsian

Set a variable before the Show-InstallationPrompt cmdlet.

$input=Show-InstallationPrompt

Then you can do an if statement based on the variable and the text on the button.

1 Like

Thank you very much, that was easy :slight_smile:

Kromsian - would you please share the script you created that uses what Brian shared with you? Thanks!

Hello,
sure , here it is :slight_smile:

$a=(Show-InstallationPrompt -Message “Restart will be required after the installation, do you want to continue?”-ButtonRightText “No” -ButtonLeftText “Yes”)
if ($a -eq “No”) {Exit-Script -ExitCode 1603}