Last active
April 16, 2024 17:59
-
-
Save ZEBAS204/6f6d556bfd810b34947d2be9aeb9c453 to your computer and use it in GitHub Desktop.
Script to kill Adobe background processes on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;===,,,@echo off | |
;;;===,,,findstr /v "^;;;===,,," "%~f0" > "%~dp0ps.ps1" | |
;;;===,,,PowerShell.exe -ExecutionPolicy Bypass -Command "& '%~dp0ps.ps1'" | |
;;;===,,,del /s /q "%~dp0ps.ps1" >NUL 2>&1 | |
;;;===,,,pause | |
# Ignore errors from `Stop-Process` | |
$PSDefaultParameterValues['Stop-Process:ErrorAction'] = 'SilentlyContinue' | |
Write-Host 'Stopping Adobe Processes...' | |
# Processes to stop | |
$ProductsNames = @('AfterFX', 'AIRobin', 'Photoshop', 'Illustrator', 'CCLibrary', 'CCXProcess', 'CoreSync', 'AdobeIPCBroker', 'AdobeCollabSync', 'armsvc', 'AdobeGCClient', 'Adobe Crash Processor') | |
# Loop throw the processes | |
try { | |
foreach ($Process in $ProductsNames) { | |
if ((Get-Process -Name $Process -ErrorAction SilentlyContinue) -eq $null) { | |
# Process not found... | |
Write-Host '[?]' $Process -ForegroundColor Blue | |
} | |
else { | |
Stop-Process -Name $Process -Force | |
if((Get-Process -Name $Process -ErrorAction SilentlyContinue) -eq $null) { | |
# Error killing process | |
Write-Host '[x]' $Process -ForegroundColor red | |
} | |
else { | |
# Process killed | |
Write-Host '[-]' $Process -ForegroundColor green | |
} | |
} | |
} | |
# Reference to colours | |
Write-Host `n'=========================' | |
Write-Host '[?] Process not found' -ForegroundColor Blue | |
Write-Host '[x] Error killing process' -ForegroundColor red | |
Write-Host '[-] Process killed' -ForegroundColor green | |
Write-Host '========================='`n | |
} catch { | |
Write-Output $_ | |
Pause | |
exit | |
} | |
Write-Host `n'Done.' | |
exit | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment