commit
bba5c8a39a
109 files changed
+14085
No files matched your search
@@ -0,0 +1,37 @@
|
||||
# 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."
|
||||
Reference in new issue
Block a user