mirror of
https://github.com/bellingcat/facebook-downloader.git
synced 2026-06-07 19:18:31 +03:00
27 lines
910 B
PowerShell
27 lines
910 B
PowerShell
# Define target directory for removal
|
|
$geckoDir = "$env:USERPROFILE\facebook-downloader\GeckoDriver"
|
|
|
|
# Function to remove directory
|
|
function RemoveDir([string]$dirPath) {
|
|
if (Test-Path $dirPath) {
|
|
Remove-Item -Path $dirPath -Recurse -Force
|
|
Write-Host "Removed directory: $dirPath"
|
|
} else {
|
|
Write-Host "Directory $dirPath does not exist."
|
|
}
|
|
}
|
|
|
|
# Remove GeckoDriver directory
|
|
RemoveDir $geckoDir
|
|
|
|
# Remove the geckodriver directory from PATH
|
|
$pathEnv = [Environment]::GetEnvironmentVariable("PATH", [EnvironmentVariableTarget]::User)
|
|
$newPath = ($pathEnv -split ";" | Where-Object { $_ -ne $geckoDir }) -join ";"
|
|
[Environment]::SetEnvironmentVariable("PATH", $newPath, [EnvironmentVariableTarget]::User)
|
|
Write-Host "Removed GeckoDriver directory from PATH."
|
|
|
|
# Uninstall facebook-downloader Python package
|
|
pip uninstall facebook-downloader -y
|
|
|
|
Write-Host "Cleanup complete."
|