-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPrinterTools.bat
More file actions
31 lines (26 loc) · 776 Bytes
/
Copy pathPrinterTools.bat
File metadata and controls
31 lines (26 loc) · 776 Bytes
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
@Echo off
SetLocal EnableDelayedExpansion
:: Launcher for Spooler64 Windows Printer Tools
Set "ROOT_PATH=%~dp0"
Set "SPOOLER64_SCRIPT=%ROOT_PATH%Spooler64\PrinterTools.bat"
Color 0A
Title Windows Printer Tools Launcher
:: Require admin
Net Session >nul 2>&1
If %ErrorLevel% NEQ 0 (
Echo [ERROR] Administrator privileges required.
Echo Right-click and choose "Run as administrator".
Pause
Exit /B 1
)
If Exist "%SPOOLER64_SCRIPT%" (
Echo [INFO] Launching in a new window: %SPOOLER64_SCRIPT%
Start "Windows Printer Tools" cmd /k ""%SPOOLER64_SCRIPT%""
) Else (
Echo [ERROR] Spooler64 tool not found at:
Echo %SPOOLER64_SCRIPT%
Echo Make sure the folder structure is:
Echo .\Spooler64\PrinterTools.bat
Pause
)
Exit /B 0