first commit
This commit is contained in:
34
Uninstall.ps1
Normal file
34
Uninstall.ps1
Normal file
@@ -0,0 +1,34 @@
|
||||
# Uninstall.ps1
|
||||
# Script to uninstall the folder backup context menu integration
|
||||
|
||||
# Check for admin rights
|
||||
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
||||
if (-not $isAdmin) {
|
||||
Write-Host "Bu komut dosyasý yönetici ayrýcalýklarý gerektirir. Lütfen Yönetici olarak çalýþtýrýn." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Klasör Yedekleme Sað Týk Menüsü Entegrasyonu Kaldýrýlýyor..." -ForegroundColor Yellow
|
||||
|
||||
# Define registry paths
|
||||
$FolderContextMenuPath = "Registry::HKEY_CLASSES_ROOT\Directory\shell\BackupFolder"
|
||||
$BackgroundContextMenuPath = "Registry::HKEY_CLASSES_ROOT\Directory\Background\shell\BackupFolder"
|
||||
|
||||
try {
|
||||
# Remove folder context menu entry
|
||||
if (Test-Path $FolderContextMenuPath) {
|
||||
Remove-Item -Path $FolderContextMenuPath -Recurse -Force
|
||||
Write-Host "Klasör sað týk menüsü girdisi kaldýrýldý" -ForegroundColor Green
|
||||
}
|
||||
|
||||
# Remove background context menu entry
|
||||
if (Test-Path $BackgroundContextMenuPath) {
|
||||
Remove-Item -Path $BackgroundContextMenuPath -Recurse -Force
|
||||
Write-Host "Arka plan sað týk menüsü girdisi kaldýrýldý" -ForegroundColor Green
|
||||
}
|
||||
|
||||
Write-Host "Kaldýrma iþlemi baþarýyla tamamlandý!" -ForegroundColor Green
|
||||
}
|
||||
catch {
|
||||
Write-Host "Kaldýrma iþlemi sýrasýnda hata oluþtu: $($_.Exception.Message)" -ForegroundColor Red
|
||||
}
|
||||
Reference in New Issue
Block a user