$ErrorActionPreference = 'SilentlyContinue'
Add-Type -AssemblyName System.Windows.Forms
$answer = [Windows.Forms.MessageBox]::Show('Disinstallare RansomBackup FREE da questo utente? I backup già caricati non verranno cancellati.', 'RansomBackup FREE', 'YesNo', 'Warning')
if ($answer -ne 'Yes') { exit 0 }
Unregister-ScheduledTask -TaskName 'RansomBackup FREE' -Confirm:$false
. (Join-Path $PSScriptRoot 'Common.ps1')
Remove-RBStartupScheduler
$startMenu = Join-Path $env:APPDATA 'Microsoft\Windows\Start Menu\Programs\RansomBackup FREE'
Remove-Item -LiteralPath $startMenu -Recurse -Force
Remove-Item -LiteralPath (Join-Path $env:APPDATA 'RansomBackupFREE') -Recurse -Force
Remove-Item -LiteralPath (Join-Path $env:LOCALAPPDATA 'RansomBackupFREE\cache') -Recurse -Force
[Windows.Forms.MessageBox]::Show('Configurazione e pianificazione rimosse. I backup remoti non sono stati cancellati.', 'RansomBackup FREE', 'OK', 'Information') | Out-Null
