-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.bat
More file actions
65 lines (53 loc) · 1.68 KB
/
uninstall.bat
File metadata and controls
65 lines (53 loc) · 1.68 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@echo off
echo.
echo ============================================================
echo CorridorKey for Resolve - Uninstaller
echo ============================================================
echo.
echo This will remove:
echo - OFX plugin from Program Files
echo - Python virtual environment
echo - CorridorKey model files
echo - Backend files
echo.
set /p CONFIRM=" Are you sure? (Y/N): "
if /i not "%CONFIRM%"=="Y" goto :cancelled
echo.
:: Kill backend processes
echo Stopping backend processes...
taskkill /F /IM python.exe /FI "MODULES eq torch_cpu.dll" >nul 2>&1
timeout /t 2 /nobreak >nul
:: Remove backend directory
if not exist "%APPDATA%\CorridorKeyForResolve" goto :no_backend
echo Removing backend files...
rmdir /S /Q "%APPDATA%\CorridorKeyForResolve"
echo Done.
goto :remove_ofx
:no_backend
echo Backend directory not found.
:remove_ofx
:: Remove OFX plugin
set "OFX_PLUGIN=C:\Program Files\Common Files\OFX\Plugins\CorridorKeyForResolve.ofx.bundle"
if not exist "%OFX_PLUGIN%" goto :no_ofx
echo Removing OFX plugin (may prompt for admin)...
powershell -Command "Start-Process powershell -ArgumentList '-Command Remove-Item -LiteralPath ''C:\Program Files\Common Files\OFX\Plugins\CorridorKeyForResolve.ofx.bundle'' -Recurse -Force' -Verb RunAs -Wait"
if exist "%OFX_PLUGIN%" (
echo WARNING: Could not remove OFX plugin. Delete manually.
) else (
echo OFX plugin removed.
)
goto :done
:no_ofx
echo OFX plugin not found.
:done
echo.
echo ============================================================
echo Uninstall complete.
echo ============================================================
echo.
pause
exit /b 0
:cancelled
echo Cancelled.
pause
exit /b 0