This commit is contained in:
USER
2025-09-22 18:45:25 +01:00
parent 0443a95ea3
commit 9091bc2a2e
2 changed files with 26 additions and 1 deletions

View File

@ -83,7 +83,7 @@ if [%ZUPER%] == [1] (
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -ac -p "\\reception1\ZEBRA"
C:\Scripts\wLocal\SystemChecks\CheckInstallPrinter.bat RECEPTION1 ZEBRA
timeout 10
C:\Scripts\wLocal\SystemChecks\CheckInstallPrinter.bat RECEPTION2 BROTHER
C:\Scripts\wLocal\SystemChecks\SetDefaultPrinter.bat RECEPTION2 BROTHER
timeout 10
)
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "Fax"

View File

@ -0,0 +1,25 @@
@ECHO OFF
set path=%PATH%
set myPrintServer=%1
set myPrinter=%2
REM Check if myPrintServer is reachable
ping -n 1 %myPrintServer% >nul 2>&1
if errorlevel 1 (
echo "%myPrintServer% is not reachable"
exit /b
)
REM Check if myPrinter is available
rundll32 printui.dll,PrintUIEntry /q /t1 /n "\\%myPrintServer%\%myPrinter%" >nul 2>&1
if errorlevel 1 (
echo Printer %myPrinter% is not available.
) else (
echo Printer %myPrinter% is available.
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -ac -p "\\%myPrintServer%\%myPrinter%"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -t -p "\\%myPrintServer%\%myPrinter%"
)
exit /b