-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.ps1
More file actions
26 lines (23 loc) Β· 1.07 KB
/
Copy pathuninstall.ps1
File metadata and controls
26 lines (23 loc) Β· 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# pgflow β Windows uninstaller (PowerShell)
# Removes the binary installed by install.ps1.
#
# Uso:
# .\uninstall.ps1
# $env:PGFLOW_INSTALL_DIR = "C:\Tools"; .\uninstall.ps1
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[CmdletBinding()]
param(
[string]$InstallDir = $env:PGFLOW_INSTALL_DIR
)
$ErrorActionPreference = "Stop"
if (-not $InstallDir) {
$InstallDir = Join-Path $env:LOCALAPPDATA "pgflow"
}
$target = Join-Path $InstallDir "pgflow.exe"
if (Test-Path $target) {
Remove-Item -Path $target -Force
Write-Host ("π removed " + $target) -ForegroundColor Yellow
} else {
Write-Host ("(nothing to remove at " + $target + ")")
}