Responding to Button presses

//Responding to Button presses
Responding to Button presses2016-07-26T16:19:07+00:00

The Toolkit Forums General Responding to Button presses

  • Author
    Posts
  • Jeff
    Participant
    Post count: 2

    This is a really great tool. I’ve been in packaging for almost four years and have a good bit of experience with AdminStudio, SCCM 2007, VBScript and am just learning SCCM 2012 and Deploy-Application/PowerShell.
    For the most part, this utility is very straightforward and easy to use. I’m struggling with capturing and responding to button presses in Show-InstallationPrompt. Since I don’t know PowerShell very well and you have these functions, it’s not clear to me how to ‘capture’ those button presses and perform different actions. Could someone enlighten me as to how those variables are exposed?

    Thank you,

  • That_annoying_guy
    Participant
    Post count: 42

    I don’t use it but here’s my guess:

    [String]$MyButtonText = “click here to do stuff”
    [String]$result = Show-InstallationPrompt -ButtonRightText $MyButtonText …<more params> …

    If ($result -eq $MyButtonText) {
    Write-log “He pressed it”
    } Else {
    Write-log “He did something else”
    }

  • Jeff
    Participant
    Post count: 2

    Thank you TaG,
    That worked like a champ. I didn’t realize that I could write the output of that function into a variable like that. That was very timely as well, I checked the thread some 30 seconds after you posted.

    Take care!

You must be logged in to reply to this topic.