diff --git a/PS/pShowAppIcons.ps1 b/PS/pShowAppIcons.ps1 deleted file mode 100644 index d4b88f0..0000000 --- a/PS/pShowAppIcons.ps1 +++ /dev/null @@ -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 - } -} diff --git a/PS/pShowSeconds.ps1 b/PS/pShowSeconds.ps1 deleted file mode 100644 index 6920b5f..0000000 --- a/PS/pShowSeconds.ps1 +++ /dev/null @@ -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 - diff --git a/SystemChecks/AddPrinters.bat b/SystemChecks/AddPrinters.bat new file mode 100644 index 0000000..c16ad15 --- /dev/null +++ b/SystemChecks/AddPrinters.bat @@ -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 diff --git a/SystemChecks/RegistryUpdates.bat b/SystemChecks/RegistryUpdates.bat new file mode 100644 index 0000000..71bd50f --- /dev/null +++ b/SystemChecks/RegistryUpdates.bat @@ -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% + diff --git a/SystemChecks/Win10Checks.bat b/SystemChecks/Win10Checks.bat index cce392a..1b25e7b 100644 --- a/SystemChecks/Win10Checks.bat +++ b/SystemChecks/Win10Checks.bat @@ -1,3 +1,20 @@ @Echo off -echo "Windows 10" \ No newline at end of file +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 " " + +) + diff --git a/SystemChecks/Win11Checks.bat b/SystemChecks/Win11Checks.bat index 085574f..2dd4bf2 100644 --- a/SystemChecks/Win11Checks.bat +++ b/SystemChecks/Win11Checks.bat @@ -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 \ No newline at end of file diff --git a/archive/l_AddPrinters.bat b/archive/l_AddPrinters.bat index ce7e5fc..b8aa629 100644 --- a/archive/l_AddPrinters.bat +++ b/archive/l_AddPrinters.bat @@ -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 \ No newline at end of file +@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 diff --git a/asdqwe b/asdqwe deleted file mode 100644 index e69de29..0000000 diff --git a/asdqwer b/asdqwer deleted file mode 100644 index e69de29..0000000 diff --git a/l_AddPrinters.bat b/l_AddPrinters.bat deleted file mode 100644 index b8aa629..0000000 --- a/l_AddPrinters.bat +++ /dev/null @@ -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 diff --git a/l_RunChecks.bat b/l_RunChecks.bat new file mode 100644 index 0000000..121535c --- /dev/null +++ b/l_RunChecks.bat @@ -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 diff --git a/l_RunRegEditUpdates.bat b/l_RunRegEditUpdates.bat index 911ebb3..a8b6ac4 100644 --- a/l_RunRegEditUpdates.bat +++ b/l_RunRegEditUpdates.bat @@ -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" diff --git a/local_Logon.bat b/local_Logon.bat index 01f5d00..b17e0c0 100644 --- a/local_Logon.bat +++ b/local_Logon.bat @@ -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" \ No newline at end of file