Files
faumaray bba5c8a39a initial commit
Signed-off-by: Aleksey Selihov <faumaray@gmail.com>
2026-05-22 02:40:32 +03:00

38 lines
1.0 KiB
PowerShell

# VoidLibC Windows uninstaller. Reverses install.ps1.
param(
[string]$InstallDir = "$env:LOCALAPPDATA\VoidLibC\bin"
)
$ErrorActionPreference = "Stop"
foreach ($exe in @("voidlink.exe", "voidloader.exe")) {
$f = Join-Path $InstallDir $exe
if (Test-Path $f) {
Write-Host "Removing $f"
Remove-Item -Force $f
} else {
Write-Host "(not found: $f — skipping)"
}
}
# Remove .vle file association.
foreach ($key in @("HKCU:\Software\Classes\.vle",
"HKCU:\Software\Classes\VoidLibC.VLE.1")) {
if (Test-Path $key) {
Write-Host "Removing registry key $key"
Remove-Item -Recurse -Force $key
}
}
# Remove from user PATH.
$userPath = [Environment]::GetEnvironmentVariable("PATH", "User") ?? ""
$newPath = ($userPath -split ";" | Where-Object { $_ -ne $InstallDir }) -join ";"
if ($newPath -ne $userPath) {
[Environment]::SetEnvironmentVariable("PATH", $newPath, "User")
Write-Host "Removed $InstallDir from user PATH."
}
Write-Host ""
Write-Host "VoidLibC uninstalled."