@echo off :: Citrix Error Fix - Script :: Created by TC @ TechCentric :: PURPOSE: Closes Citrix Workspace and reopens it to clear error goto:main [+] Description: a script to close Citrix and reopened :main C: for /f "tokens=4 delims= " %%G in ('tasklist /FI "IMAGENAME eq tasklist.exe" /NH') do SET RDP_SESSION=%%G taskkill /f /t /fi "SESSION eq %RDP_SESSION%" /fi "IMAGENAME eq SelfService.exe" > nul echo "[+] Citrix processes were closed!" timeout /t 5 /nobreak > nul echo: echo: echo "[+] Citrix is starting momentarily..." timeout /t 5 /nobreak > nul start /b "" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Citrix Workspace.lnk" exit