This commit is contained in:
USER
2025-08-22 16:53:53 +01:00
parent 08e5510705
commit 1a93fccb97
13 changed files with 241 additions and 285 deletions

View File

@ -39,6 +39,22 @@ if "%check_computername%" EQU "SURGERY4" (
set PRINTER=3
)
if "%check_computername%" EQU "SURGERY5" (
set PRINTER=3
)
if "%check_computername%" EQU "SURGERY6" (
set PRINTER=3
)
if "%check_computername%" EQU "SURGERY7" (
set PRINTER=3
)
if "%check_computername%" EQU "SURGERY8" (
set PRINTER=3
)
if "%check_computername%" EQU "RECEPTION1" (
set PRINTER=1
)
@ -55,26 +71,74 @@ if "%check_computername%" EQU "RECEPTION4" (
set PRINTER=1
)
if "%check_computername%" EQU "RECEPTION5" (
set PRINTER=1
)
if "%check_computername%" EQU "RECEPTION6" (
set PRINTER=1
)
if [%ZUPER%] == [1] (
echo "Not installing printers"
) else (
if [%PRINTER%] == [1] (
echo "Installing Brother"
%EXE% -ExecutionPolicy Bypass -File %BROTHERPS%
@REM %EXE% -ExecutionPolicy Bypass -File %BROTHERPS%
@REM rundll32 printui.dll,PrintUIEntry /in /n \\reception2\brother
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\192.168.1.22\BROTHER"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception2\BROTHER"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -ac -p "\\reception2\BROTHER"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -t -p "\\reception2\BROTHER"
@REM rundll32 printui.dll,PrintUIEntry /y /n \\server_name\printer_name
)
if [%PRINTER%] == [2] (
echo "Installing Zebra"
%EXE% -ExecutionPolicy Bypass -File %ZEBRAPS%
@REM %EXE% -ExecutionPolicy Bypass -File %ZEBRAPS%
CD C:\WINDOWS\SYSTEM
@REM rundll32 printui.dll,PrintUIEntry /in /n \\reception1\zebra
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\192.168.1.21\ZEBRA"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception1\ZDesigner GK420d"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception1\ZDesigner ZD220-203dpi ZPL"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -ac -p "\\reception1\ZEBRA"
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -t -p "\\reception1\ZEBRA"
@REM rundll32 printui.dll,PrintUIEntry /y /n \\server_name\printer_name
)
if [%PRINTER%] == [3] (
echo "Installing Brother and Zebra"
%EXE% -ExecutionPolicy Bypass -File %BROTHERPS%
%EXE% -ExecutionPolicy Bypass -File %ZEBRAPS%
@REM %EXE% -ExecutionPolicy Bypass -File %BROTHERPS%
@REM %EXE% -ExecutionPolicy Bypass -File %ZEBRAPS%
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\192.168.1.22\BROTHER"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception2\BROTHER"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -ac -p "\\reception2\BROTHER"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -t -p "\\reception2\BROTHER"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\192.168.1.21\ZEBRA"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception1\ZDesigner GK420d"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception1\ZDesigner ZD220-203dpi ZPL"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -ac -p "\\reception1\ZEBRA"
)
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "Fax"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "Microsoft XPS Document Writer"
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "OneNote (Desktop)"
)
echo "FINISHED: %~n0"
@REM https://woshub.com/manage-printers-and-drivers-from-the-command-line-in-windows-8/
@REM https://ss64.com/nt/net-use.html
@REM https://www.windowscentral.com/how-properly-remove-printer-windows-10#uninstall_printer_printmanagement
@REM https://www.windowscentral.com/how-properly-remove-printer-windows-10#uninstall_printer_printmanagement
@REM Printer name \\reception1\ZDesigner GK420d
@REM Share name ZEBRA
@REM Driver name ZDesigner GK420d
@REM C:\Windows\System>cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception1\ZDesigner GK420d"
@REM Printer name \\reception2\BROTHER
@REM Share name BROTHER
@REM Driver name Brother DCP-L2510D series