
$title = "PCS.HardwareLink"
$question = "Are you sure you want to proceed?"
$choices = "&Yes", "&No"

$decision = $Host.UI.PromptForChoice($title, $question, $choices, 1)
if ($decision -eq 0) {
    $serviceName = "PCS.HardwareLink"
    $folderPath = "$env:ProgramFiles\Party Center Software\Hardware Link\"

    # -> Removes Previous Instalation (if exists)
    $serviceStatus = Get-Service "$serviceName" -ErrorAction Ignore
    do {
        sc.exe stop $serviceName
        sc.exe delete $serviceName
        $serviceStatus = Get-Service "$serviceName" -ErrorAction Ignore
    } while ($null -ne $serviceStatus)

    Remove-Item "$folderPath\*" -Recurse -Force -ErrorAction Ignore
}
else {
    exit 0
}
