.
This commit is contained in:
@ -1,8 +0,0 @@
|
||||
Set-StrictMode -Version 'latest'
|
||||
if (Test-Path -Path 'HKCU:\Control Panel\NotifyIconSettings')
|
||||
{
|
||||
Get-ChildItem -Path 'HKCU:\Control Panel\NotifyIconSettings' |
|
||||
ForEach-Object {
|
||||
Set-ItemProperty -Path ($_.PSPath) -ErrorAction SilentlyContinue -Name 'IsPromoted' -Value 0x00000001
|
||||
}
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
|
||||
If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced")) {
|
||||
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" | Out-Null }
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowSecondsInSystemClock" -Type DWord -Value 1
|
||||
|
||||
106
SystemChecks/AddPrinters.bat
Normal file
106
SystemChecks/AddPrinters.bat
Normal file
@ -0,0 +1,106 @@
|
||||
@echo off
|
||||
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\pAddNetZebra.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
|
||||
)
|
||||
|
||||
echo %COMPUTERNAME% | find /I "surgery" >nul
|
||||
if %errorlevel%==0 (
|
||||
set PRINTER=3
|
||||
)
|
||||
|
||||
echo %COMPUTERNAME% | find /I "reception" >nul
|
||||
if %errorlevel%==0 (
|
||||
set PRINTER=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "RECEPTION2" (
|
||||
set PRINTER=2
|
||||
)
|
||||
|
||||
if [%ZUPER%] == [1] (
|
||||
echo "Not installing printers"
|
||||
) else (
|
||||
if [%PRINTER%] == [1] (
|
||||
echo "Installing Brother"
|
||||
@REM %EXE% -ExecutionPolicy Bypass -File %BROTHERPS%
|
||||
@REM rundll32 printui.dll,PrintUIEntry /in /n \\reception2\brother
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\192.168.1.22\BROTHER"
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception2\BROTHER"
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -ac -p "\\reception2\BROTHER"
|
||||
@REM 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
|
||||
C:\Scripts\wLocal\SystemChecks\CheckInstallPrinter.bat RECEPTION2 BROTHER
|
||||
)
|
||||
if [%PRINTER%] == [2] (
|
||||
echo "Installing Zebra"
|
||||
@REM %EXE% -ExecutionPolicy Bypass -File %ZEBRAPS%
|
||||
CD C:\WINDOWS\SYSTEM
|
||||
@REM rundll32 printui.dll,PrintUIEntry /in /n \\reception1\zebra
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\192.168.1.21\ZEBRA"
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception1\ZDesigner GK420d"
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception1\ZDesigner ZD220-203dpi ZPL"
|
||||
@REM 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
|
||||
C:\Scripts\wLocal\SystemChecks\CheckInstallPrinter.bat RECEPTION1 ZEBRA
|
||||
)
|
||||
if [%PRINTER%] == [3] (
|
||||
echo "Installing Brother and Zebra"
|
||||
@REM %EXE% -ExecutionPolicy Bypass -File %BROTHERPS%
|
||||
@REM %EXE% -ExecutionPolicy Bypass -File %ZEBRAPS%
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\192.168.1.22\BROTHER"
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception2\BROTHER"
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -ac -p "\\reception2\BROTHER"
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -t -p "\\reception2\BROTHER"
|
||||
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\192.168.1.21\ZEBRA"
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception1\ZDesigner GK420d"
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "\\reception1\ZDesigner ZD220-203dpi ZPL"
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -ac -p "\\reception1\ZEBRA"
|
||||
C:\Scripts\wLocal\SystemChecks\CheckInstallPrinter.bat RECEPTION1 ZEBRA
|
||||
C:\Scripts\wLocal\SystemChecks\CheckInstallPrinter.bat RECEPTION2 BROTHER
|
||||
)
|
||||
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 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
|
||||
15
SystemChecks/RegistryUpdates.bat
Normal file
15
SystemChecks/RegistryUpdates.bat
Normal file
@ -0,0 +1,15 @@
|
||||
@echo on
|
||||
call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
set SHOWSECONDS="%BASE%\PS\pShowSeconds.ps1"
|
||||
set SHOWAPPICONS="%BASE%\PS\pShowAppIcons.ps1"
|
||||
set EXE="Powershell.exe"
|
||||
|
||||
echo "Installing AppIconsUpdate"
|
||||
%EXE% -ExecutionPolicy Bypass -File %SHOWAPPICONS%
|
||||
|
||||
echo "Installing SecondsUpdate"
|
||||
%EXE% -ExecutionPolicy Bypass -File %SHOWSECONDS%
|
||||
|
||||
@ -1,3 +1,20 @@
|
||||
@Echo off
|
||||
|
||||
echo "Windows 10"
|
||||
echo %COMPUTERNAME% | find /I "reception" >nul
|
||||
if %errorlevel%==0 (
|
||||
C:\Scripts\wLocal\SystemChecks\AddPrinters.bat
|
||||
)
|
||||
|
||||
echo %COMPUTERNAME% | find /I "surgery" >nul
|
||||
if %errorlevel%==0 (
|
||||
|
||||
C:\Scripts\wLocal\SystemChecks\AddPrinters.bat
|
||||
|
||||
)
|
||||
|
||||
echo %COMPUTERNAME% | find /I "server2" >nul
|
||||
if %errorlevel%==0 (
|
||||
echo " "
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ -8,6 +8,8 @@ if %errorlevel%==0 (
|
||||
C:\Scripts\wLocal\SystemChecks\CheckSoftware.bat Exact "C:\Program Files\LibreOffice\program\soffice.exe"
|
||||
C:\Scripts\wLocal\SystemChecks\CheckSoftware.bat ExaminePro "C:\Program Files\LibreOffice\program\soffice.exe"
|
||||
C:\Scripts\wLocal\SystemChecks\CheckSoftware.bat Kavo "C:\Program Files\LibreOffice\program\soffice.exe"
|
||||
|
||||
C:\Scripts\wLocal\SystemChecks\AddPrinters.bat
|
||||
)
|
||||
|
||||
echo %COMPUTERNAME% | find /I "surgery" >nul
|
||||
@ -16,6 +18,9 @@ if %errorlevel%==0 (
|
||||
C:\Scripts\wLocal\SystemChecks\CheckSoftware.bat Exact "C:\Program Files\LibreOffice\program\soffice.exe"
|
||||
C:\Scripts\wLocal\SystemChecks\CheckSoftware.bat ExaminePro "C:\Program Files\LibreOffice\program\soffice.exe"
|
||||
C:\Scripts\wLocal\SystemChecks\CheckSoftware.bat Kavo "C:\Program Files\LibreOffice\program\soffice.exe"
|
||||
|
||||
C:\Scripts\wLocal\SystemChecks\AddPrinters.bat
|
||||
|
||||
)
|
||||
|
||||
echo %COMPUTERNAME% | find /I "server2" >nul
|
||||
@ -25,7 +30,3 @@ if %errorlevel%==0 (
|
||||
C:\Scripts\wLocal\SystemChecks\CheckSoftware.bat SafeNet "C:\Program Files\LibreOffice\program\soffice.exe"
|
||||
)
|
||||
|
||||
C:\Scripts\wLocal\SystemChecks\CheckInstallPrinter.bat RECEPTION1 ZEBRA
|
||||
echo %errorlevel%
|
||||
|
||||
C:\Scripts\wLocal\SystemChecks\CheckInstallPrinter.bat RECEPTION2 BROTHER
|
||||
@ -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
|
||||
|
||||
@ -1,144 +0,0 @@
|
||||
@echo off
|
||||
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\pAddNetZebra.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%
|
||||
@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"
|
||||
@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"
|
||||
@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 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
|
||||
22
l_RunChecks.bat
Normal file
22
l_RunChecks.bat
Normal file
@ -0,0 +1,22 @@
|
||||
@echo off
|
||||
|
||||
setlocal
|
||||
|
||||
@REM Get the Windows version
|
||||
for /f "tokens=4-5 delims= " %%a in ('ver') do (
|
||||
set version=%%a.%%b
|
||||
)
|
||||
|
||||
@REM Check if the version is Windows 11
|
||||
if "%version%" geq "10.0.22000" (
|
||||
echo "This script is running on Windows 11."
|
||||
C:\Scripts\wLocal\SystemChecks\Win11Checks.bat
|
||||
)
|
||||
|
||||
@REM Check if the version is Windows 10
|
||||
if "%version%" geq "10.0.19045" (
|
||||
echo "This script is running on Windows 10."
|
||||
C:\Scripts\wLocal\SystemChecks\Win10Checks.bat
|
||||
)
|
||||
|
||||
endlocal
|
||||
@ -1,119 +1,3 @@
|
||||
@echo on
|
||||
call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
set PRINTERPS="%LOCAL%\PS\pAddPrinters.ps1"
|
||||
set BROTHERPS="%LOCAL%\PS\pShowSeconds.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%
|
||||
)
|
||||
if [%PRINTER%] == [2] (
|
||||
echo "Installing Zebra"
|
||||
@REM %EXE% -ExecutionPolicy Bypass -File %ZEBRAPS%
|
||||
)
|
||||
if [%PRINTER%] == [3] (
|
||||
echo "Installing SecondsUpdate and AppIconsUpdate"
|
||||
%EXE% -ExecutionPolicy Bypass -File %BROTHERPS%
|
||||
%EXE% -ExecutionPolicy Bypass -File %ZEBRAPS%
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
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
|
||||
echo " delete this file"
|
||||
|
||||
@ -3,7 +3,7 @@ call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
call \scripts\wbase\bin\pull.bat
|
||||
call C:\scripts\wpublic\bin\pull.bat
|
||||
|
||||
FOR %%x IN (%LOCAL%\l_*.bat) DO (
|
||||
echo "%%x"
|
||||
@ -15,4 +15,8 @@ FOR %%x IN (C:\Scripts\Secrets\l_*.bat) DO (
|
||||
call "%%x"
|
||||
)
|
||||
|
||||
@REM delete no longer needed files
|
||||
c:\pull.bat
|
||||
c:\scripts\wlocal\l_RunRegEditUpdates.bat
|
||||
|
||||
echo "FINISHED: %~n0"
|
||||
Reference in New Issue
Block a user