Updated to print service power shell
This commit is contained in:
69
windows_print_service/uninstall_service.bat
Normal file
69
windows_print_service/uninstall_service.bat
Normal file
@@ -0,0 +1,69 @@
|
||||
@echo off
|
||||
REM Quality Recticel Print Service - Uninstaller
|
||||
REM This script removes the Windows print service
|
||||
|
||||
echo ================================================
|
||||
echo Quality Recticel Print Service - Uninstaller
|
||||
echo ================================================
|
||||
echo.
|
||||
|
||||
REM Check if running as administrator
|
||||
net session >nul 2>&1
|
||||
if %errorLevel% NEQ 0 (
|
||||
echo ERROR: This script must be run as Administrator!
|
||||
echo Right-click on uninstall_service.bat and select "Run as administrator"
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo ✅ Administrator privileges confirmed
|
||||
echo.
|
||||
|
||||
REM Service configuration
|
||||
set SERVICE_NAME=QualityRecticelPrintService
|
||||
set SERVICE_DIR=C:\Program Files\QualityRecticel\PrintService
|
||||
|
||||
echo Stopping the service...
|
||||
sc stop "%SERVICE_NAME%" >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo ⚠️ Service was not running or already stopped
|
||||
) else (
|
||||
echo ✅ Service stopped successfully
|
||||
timeout /t 2 /nobreak >nul
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Deleting the service...
|
||||
sc delete "%SERVICE_NAME%"
|
||||
if errorlevel 1 (
|
||||
echo ❌ Failed to delete service (it may not exist)
|
||||
) else (
|
||||
echo ✅ Service deleted successfully
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Removing service files...
|
||||
if exist "%SERVICE_DIR%" (
|
||||
rmdir /s /q "%SERVICE_DIR%" 2>nul
|
||||
if exist "%SERVICE_DIR%" (
|
||||
echo ⚠️ Could not completely remove service directory
|
||||
echo Some files may still be in use. Restart and try again.
|
||||
) else (
|
||||
echo ✅ Service files removed successfully
|
||||
)
|
||||
) else (
|
||||
echo ⚠️ Service directory not found (may already be removed)
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ================================================
|
||||
echo Uninstallation Complete!
|
||||
echo ================================================
|
||||
echo.
|
||||
echo The Quality Recticel Print Service has been removed from your system.
|
||||
echo.
|
||||
echo If you had any Chrome extensions installed, you may want to:
|
||||
echo 1. Remove the Quality Recticel Print extension from Chrome
|
||||
echo 2. Clear any remaining Chrome extension data
|
||||
echo.
|
||||
pause
|
||||
Reference in New Issue
Block a user