$message = "Do you want to block users from installing software?"
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", `
  "Blocks users from installing software."
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", `
  "Does nothing."
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
$result = $host.ui.PromptForChoice($title, $message, $options, 1)
switch ($result) {
  0 {
    $dir = 'HKLM:\SOFTWARE\Classes\Msi.Package\DefaultIcon'
    Set-ItemProperty $dir -Name '(Default)' -Type String -Value 'C:\Windows\System32\msiexec.exe,1'
  }
}
