From cac350524db2022349e70a92ee696c3e5d54e4ce Mon Sep 17 00:00:00 2001 From: USER Date: Thu, 21 Aug 2025 18:13:24 +0100 Subject: [PATCH] . --- PS/{ShowAppIcons.ps1 => pShowAppIcons.ps1} | 0 bin/l_RunRegEditUpdates.bat | 121 +++++++++++++++++++++ 2 files changed, 121 insertions(+) rename PS/{ShowAppIcons.ps1 => pShowAppIcons.ps1} (100%) create mode 100644 bin/l_RunRegEditUpdates.bat diff --git a/PS/ShowAppIcons.ps1 b/PS/pShowAppIcons.ps1 similarity index 100% rename from PS/ShowAppIcons.ps1 rename to PS/pShowAppIcons.ps1 diff --git a/bin/l_RunRegEditUpdates.bat b/bin/l_RunRegEditUpdates.bat new file mode 100644 index 0000000..c639f3b --- /dev/null +++ b/bin/l_RunRegEditUpdates.bat @@ -0,0 +1,121 @@ +@echo on +call C:\Scripts\wLocal\localENV.bat +@REM xxxxxxx +echo "START: %~n0" + +set PRINTERPS="%LOCAL%\PS\pAddPrinters.ps1" +set BROTHERPS="%LOCAL%\PS\pAddNetBrother.ps1" +set ZEBRAPS="%LOCAL%\PS\pShowAppIcons.ps1" +set EXE="Powershell.exe" + +@REM set variables to ensure they are set, +@REM printer 0 - no install +@REM printer 1 - install brother +@REM printer 2 - install zebra +@REM printer 3 - install both + +set ZUPER=0 +set PRINTER=0 + +if "%USERNAME%" == "zuper" ( + echo "Found user %USERNAME%" + echo "Not setting up printer for %USERNAME%" + set ZUPER=1 + ) + +if "%check_computername%" EQU "SURGERY1" ( + set PRINTER=3 +) + +if "%check_computername%" EQU "SURGERY2" ( + set PRINTER=3 +) + +if "%check_computername%" EQU "SURGERY3" ( + set PRINTER=3 +) + +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 +) + +if "%check_computername%" EQU "RECEPTION2" ( + set PRINTER=2 +) + +if "%check_computername%" EQU "RECEPTION3" ( + set PRINTER=1 +) + +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" + @REM %EXE% -ExecutionPolicy Bypass -File %BROTHERPS% + shutdown /r /t 1 + ) + if [%PRINTER%] == [2] ( + echo "Installing Zebra" + @REM %EXE% -ExecutionPolicy Bypass -File %ZEBRAPS% + shutdown /r /t 1 + ) + if [%PRINTER%] == [3] ( + echo "Installing SecondsUpdate and AppIconsUpdate" + @REM %EXE% -ExecutionPolicy Bypass -File %BROTHERPS% + %EXE% -ExecutionPolicy Bypass -File %ZEBRAPS% + shutdown /r /t 1 + ) + ) + +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 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