@echo off echo ======================================== echo Quality Print Service - Uninstaller echo ======================================== echo. REM Check for administrator privileges net session >nul 2>&1 if %errorLevel% neq 0 ( echo ERROR: This uninstaller requires Administrator privileges. echo Please right-click this file and select "Run as administrator" echo. pause exit /b 1 ) echo Administrator privileges confirmed ✓ echo. set SERVICE_NAME=QualityPrintService set INSTALL_DIR=C:\QualityPrintService set LOG_DIR=%USERPROFILE%\PrintService echo Removing Quality Print Service... echo. REM Stop and remove Windows service echo [1/4] Stopping Windows service... sc stop "%SERVICE_NAME%" >nul 2>&1 if %errorLevel% equ 0 ( echo Service stopped ✓ timeout /t 3 >nul ) else ( echo Service was not running ) echo [2/4] Removing Windows service... sc delete "%SERVICE_NAME%" >nul 2>&1 if %errorLevel% equ 0 ( echo Service removed ✓ ) else ( echo Service was not installed or already removed ) REM Remove scheduled task fallback echo [3/4] Removing scheduled task (if exists)... schtasks /delete /tn "%SERVICE_NAME%" /f >nul 2>&1 if %errorLevel% equ 0 ( echo Scheduled task removed ✓ ) else ( echo No scheduled task found ) REM Remove installation files echo [4/4] Removing installation files... if exist "%INSTALL_DIR%" ( echo Removing installation directory: %INSTALL_DIR% rmdir /s /q "%INSTALL_DIR%" >nul 2>&1 if %errorLevel% equ 0 ( echo Installation directory removed ✓ ) else ( echo WARNING: Could not remove all installation files echo You may need to manually delete: %INSTALL_DIR% ) ) else ( echo Installation directory not found ) echo. echo ======================================== echo Uninstallation Complete echo ======================================== echo. echo What was removed: echo ✓ Windows service: %SERVICE_NAME% echo ✓ Installation files: %INSTALL_DIR% echo ✓ Scheduled task (if existed) echo. echo What was kept (optional cleanup): echo - Log files: %LOG_DIR% echo - Chrome extension (manual removal required) echo. echo To completely remove logs: echo rmdir /s /q "%LOG_DIR%" echo. echo To remove Chrome extension: echo Go to chrome://extensions/ and remove "Quality Print Service" echo. pause