Responding to Button presses

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,

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

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!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.