Show-InstallationPrompt – Buttons – catching results

//Show-InstallationPrompt – Buttons – catching results
Show-InstallationPrompt – Buttons – catching results 2015-06-05T15:45:55+00:00

The Toolkit Forums General Show-InstallationPrompt – Buttons – catching results

  • Author
    Posts
  • Kromsian
    Participant
    Post count: 4
    #296 |

    Hello,

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

    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 🙂

    Thanks for any advice, solution , push 🙂

    Regards
    T. Kromsian

  • Brian
    Participant
    Post count: 2

    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.

    • This reply was modified 2 years, 7 months ago by  Brian.
    • Kromsian
      Participant
      Post count: 4

      Thank you very much, that was easy 🙂

  • Scott
    Participant
    Post count: 2

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

    • Kromsian
      Participant
      Post count: 4

      Hello,
      sure , here it is 🙂

      $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}

You must be logged in to reply to this topic.