@echo off
setlocal EnableExtensions
net session >nul 2>&1
if errorlevel 1 (
  powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
  exit /b
)
if defined ProgramFiles(x86) (set "PF=%ProgramFiles(x86)%") else (set "PF=%ProgramFiles%")
rd /s /q "%PF%\K-Diagnostics\Remote VCI Client" 2>nul
rd /s /q "%PF%\K-Diagnostics\Virtual Tester VCI Bridge" 2>nul
powershell -NoProfile -ExecutionPolicy Bypass -Command "Remove-Item -Force -ErrorAction SilentlyContinue ([Environment]::GetFolderPath('CommonPrograms')+'\K-Diagnostics Remote VCI Client.lnk'),([Environment]::GetFolderPath('CommonDesktopDirectory')+'\K-Diagnostics Remote VCI Client.lnk'),([Environment]::GetFolderPath('CommonPrograms')+'\K-Diagnostics Virtual Tester VCI Bridge.lnk'),([Environment]::GetFolderPath('CommonDesktopDirectory')+'\K-Diagnostics Virtual Tester VCI Bridge.lnk')"
echo Removed K-Diagnostics Virtual Tester VCI Bridge.
pause
