@echo off rem Guanlan uninstaller (entry). Windows batch must stay pure ASCII: see src/entry_refs.py. rem Usage: uninstall.bat [--dry-run] [--yes] [--purge] [--all] [--keep-logs] [--selftest] rem NOTE: the console working directory is moved to %TEMP% on purpose. Windows refuses to delete rem a directory that is the current directory of a live process, and --all has to delete rem this very folder. All paths below are absolute, so nothing depends on the cwd. chcp 65001 >nul set PYTHONUTF8=1 set "HERE=%~dp0" set "SCRIPT=%HERE%scripts\guanlan_uninstall.py" cd /d "%TEMP%" if exist "%HERE%.venv\Scripts\python.exe" ( "%HERE%.venv\Scripts\python.exe" "%SCRIPT%" %* goto done ) where py >nul 2>nul && ( py -3 "%SCRIPT%" %* goto done ) python "%SCRIPT%" %* :done pause