Compare commits
59 Commits
406443727d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d24e537174 | |||
| faa850471d | |||
| a46f7fabfc | |||
| 6af3543fab | |||
| e14125cb27 | |||
| 8a8e06c486 | |||
| 77e98cdd85 | |||
| ce657d803d | |||
| 60b345d04a | |||
| 20a9ab4c58 | |||
| b9cd7a2d21 | |||
| f9cc203637 | |||
| 49fb772475 | |||
| aa10e6dd54 | |||
| 9091bc2a2e | |||
| 0443a95ea3 | |||
| 4add2bc8ea | |||
| eaf5cbc520 | |||
| 01eb6d47f4 | |||
| 3bebcf5f07 | |||
| e0fc96f9c8 | |||
| 93c82ea229 | |||
| 8c5b4ecc57 | |||
| 2b129f85f2 | |||
| b18e49dde5 | |||
| b6773923c6 | |||
| ed46f720fd | |||
| 30eeaeceb6 | |||
| 707b5b5bb7 | |||
| 72b1f25f75 | |||
| 114df0fd44 | |||
| e24b1317c7 | |||
| f735b06138 | |||
| 58a5293abb | |||
| b5665b499e | |||
| 1b70ab280b | |||
| f1a663fc7d | |||
| ac86aca959 | |||
| 1a93fccb97 | |||
| 08e5510705 | |||
| 94e49c6f0a | |||
| 36f9487ca0 | |||
| c790d986b1 | |||
| e6a36c0426 | |||
| 3de28867b2 | |||
| 8202867bed | |||
| 10594ea48f | |||
| 4a5bcdd8cf | |||
| 6356998d51 | |||
| 63981c003b | |||
| 837d0723a6 | |||
| 2228eab70a | |||
| 5f86ebea6e | |||
| ad783364d7 | |||
| cac350524d | |||
| 8f7b55b414 | |||
| dbbb891a7b | |||
| b0d317ba52 | |||
| 36d276efea |
4
Regedit/pShowAppIcons.reg
Normal file
4
Regedit/pShowAppIcons.reg
Normal file
@ -0,0 +1,4 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer]
|
||||
"EnableAutoTray"=dword:00000001
|
||||
112
SystemChecks/AddPrinters.bat
Normal file
112
SystemChecks/AddPrinters.bat
Normal file
@ -0,0 +1,112 @@
|
||||
@echo off
|
||||
call C:\Scripts\wBase\baseENV.bat
|
||||
call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
@REM set powershell variables
|
||||
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
|
||||
timeout 10
|
||||
)
|
||||
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
|
||||
timeout 10
|
||||
)
|
||||
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
|
||||
timeout 10
|
||||
C:\Scripts\wLocal\SystemChecks\SetDefaultPrinter.bat RECEPTION2 BROTHER
|
||||
timeout 10
|
||||
)
|
||||
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
|
||||
24
SystemChecks/CheckInstallPrinter.bat
Normal file
24
SystemChecks/CheckInstallPrinter.bat
Normal file
@ -0,0 +1,24 @@
|
||||
@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%"
|
||||
)
|
||||
|
||||
exit /b
|
||||
23
SystemChecks/CheckPrinterBrother.bat
Normal file
23
SystemChecks/CheckPrinterBrother.bat
Normal file
@ -0,0 +1,23 @@
|
||||
@ECHO OFF
|
||||
set path=%PATH%
|
||||
|
||||
set myPrintServer=RECEPTION2
|
||||
set myPrinter=BROTHER
|
||||
|
||||
|
||||
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.
|
||||
)
|
||||
|
||||
exit /b
|
||||
23
SystemChecks/CheckPrinterZebra.bat
Normal file
23
SystemChecks/CheckPrinterZebra.bat
Normal file
@ -0,0 +1,23 @@
|
||||
@ECHO OFF
|
||||
set path=%PATH%
|
||||
|
||||
set myPrintServer=RECEPTION1
|
||||
set myPrinter=ZEBRA
|
||||
|
||||
|
||||
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.
|
||||
)
|
||||
|
||||
exit /b
|
||||
23
SystemChecks/CheckSoftware.bat
Normal file
23
SystemChecks/CheckSoftware.bat
Normal file
@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
call C:\Scripts\wBase\baseENV.bat
|
||||
call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
set path=%PATH%
|
||||
|
||||
set Software="LibreOffice"
|
||||
set SoftwarePath="C:\Program Files\LibreOffice\program\soffice.exe"
|
||||
|
||||
echo "Checking for %1 at %2"
|
||||
|
||||
REM Check if LibreOffice is installed
|
||||
if exist %2 (
|
||||
echo "%1 is installed"
|
||||
) else (
|
||||
echo "%1 is not installed"
|
||||
call %TMESSAGE% '"%1 missing on %check_computername%"'
|
||||
)
|
||||
|
||||
exit /b
|
||||
|
||||
22
SystemChecks/RegistryUpdates.bat
Normal file
22
SystemChecks/RegistryUpdates.bat
Normal file
@ -0,0 +1,22 @@
|
||||
@echo off
|
||||
call C:\Scripts\wBase\baseENV.bat
|
||||
call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
@REM set powershell variables
|
||||
set SHOWSECONDS="%BASE%\PS\pShowSeconds.ps1"
|
||||
set SHOWAPPICONS="%BASE%\PS\pShowAppIcons.ps1"
|
||||
set DISABLEPRINTERMAN="%BASE%\PS\pDisablePrinterMan.ps1"
|
||||
|
||||
|
||||
echo "Installing AppIconsUpdate"
|
||||
%POWERSHELL% -ExecutionPolicy Bypass -File %SHOWAPPICONS%
|
||||
|
||||
echo "Installing SecondsUpdate"
|
||||
%POWERSHELL% -ExecutionPolicy Bypass -File %SHOWSECONDS%
|
||||
|
||||
echo "Disable Windows Deafult Printer Management"
|
||||
%POWERSHELL% -ExecutionPolicy Bypass -File %DISABLEPRINTERMAN%
|
||||
|
||||
echo "FINISHED: %~n0"
|
||||
22
SystemChecks/RunChecks.bat
Normal file
22
SystemChecks/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
|
||||
26
SystemChecks/SetDefaultPrinter.bat
Normal file
26
SystemChecks/SetDefaultPrinter.bat
Normal file
@ -0,0 +1,26 @@
|
||||
@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%"
|
||||
@REM cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -t -p "\\%myPrintServer%\%myPrinter%"
|
||||
RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "\\%myPrintServer%\%myPrinter%"
|
||||
)
|
||||
|
||||
exit /b
|
||||
21
SystemChecks/Win10Checks.bat
Normal file
21
SystemChecks/Win10Checks.bat
Normal file
@ -0,0 +1,21 @@
|
||||
@Echo off
|
||||
|
||||
echo %COMPUTERNAME% | find /I "reception" >nul
|
||||
if %errorlevel%==0 (
|
||||
%SECRETS%\l_Shares.bat
|
||||
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 " "
|
||||
|
||||
)
|
||||
|
||||
53
SystemChecks/Win11Checks.bat
Normal file
53
SystemChecks/Win11Checks.bat
Normal file
@ -0,0 +1,53 @@
|
||||
@echo off
|
||||
call C:\Scripts\wBase\baseENV.bat
|
||||
call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
echo %COMPUTERNAME% | find /I "reception" >nul
|
||||
if %errorlevel%==0 (
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat LibreOffice "C:\Program Files\LibreOffice\program\soffice.exe"
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat Securilog "C:\Isopharm\Securilog\Securilog.exe"
|
||||
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat Daryou "C:\Windows\twain_32\DY50TWAIN\transfer.exe"
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat Exact "C:\Program Files (x86)\Software of Excellence\EXACT\Launch\SoeiDental.ExactLauncher.exe"
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat ExaminePro "C:\Program Files (x86)\SOE\ExPro\ExPro.exe"
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat Kavo "C:\Program Files (x86)\PaloDEx Group\IAM\KaVoDriverDashboard.exe"
|
||||
|
||||
%LOCAL%\SystemChecks\RegistryUpdates.bat
|
||||
%SECRETS%\l_Shares.bat
|
||||
%LOCAL%\SystemChecks\AddPrinters.bat
|
||||
)
|
||||
|
||||
echo %COMPUTERNAME% | find /I "surgery" >nul
|
||||
if %errorlevel%==0 (
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat Daryou "C:\Windows\twain_32\DY50TWAIN\transfer.exe"
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat Exact "C:\Program Files (x86)\Software of Excellence\EXACT\Launch\SoeiDental.ExactLauncher.exe"
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat ExaminePro "C:\Program Files (x86)\SOE\ExPro\ExPro.exe"
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat Kavo "C:\Program Files (x86)\PaloDEx Group\IAM\KaVoDriverDashboard.exe"
|
||||
|
||||
%LOCAL%\SystemChecks\RegistryUpdates.bat
|
||||
%SECRETS%\l_Shares.bat
|
||||
%LOCAL%\SystemChecks\l_FixWordPad.bat
|
||||
%LOCAL%\SystemChecks\AddPrinters.bat
|
||||
)
|
||||
|
||||
echo %COMPUTERNAME% | find /I "server" >nul
|
||||
if %errorlevel%==0 (
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat BackupAssist "C:\Program Files (x86)\BackupAssist v14\BackupAssist.exe"
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat Exact "C:\Program Files (x86)\Software of Excellence\EXACT Server\dental.exe"
|
||||
%LOCAL%\SystemChecks\CheckSoftware.bat SafeNet "C:\Program Files (x86)\SafeNet Sentinel\Sentinel Protection Installer\7.7.0\English\ReadMe.pdf"
|
||||
|
||||
%LOCAL%\SystemChecks\RegistryUpdates.bat
|
||||
%SECRETS%\l_Shares.bat
|
||||
%LOCAL%\SystemChecks\l_FixWordPad.bat
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
36
SystemChecks/l_FixWordPad.bat
Normal file
36
SystemChecks/l_FixWordPad.bat
Normal file
@ -0,0 +1,36 @@
|
||||
@echo off
|
||||
call C:\Scripts\wBase\baseENV.bat
|
||||
call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
set path=%PATH%
|
||||
|
||||
set Software="Wordpad"
|
||||
set SoftwarePath="W:\Windows NT"
|
||||
|
||||
|
||||
REM Check if Wordpad is available
|
||||
if exist %SoftwarePath% (
|
||||
echo "%Software% is available"
|
||||
|
||||
mkdir "C:\Scripts\Wordpad"
|
||||
xcopy "W:\*" "C:\Scripts\Wordpad\" /h /e /y
|
||||
|
||||
) else (
|
||||
if exist "D:\my\myHomes\DocumentsHighfieldApps\Wordpad" (
|
||||
echo "%Software% is available on Server"
|
||||
|
||||
mkdir "C:\Scripts\Wordpad"
|
||||
xcopy "D:\my\myHomes\DocumentsHighfieldApps\Wordpad\*" "C:\Scripts\Wordpad\" /h /e /y
|
||||
|
||||
) else (
|
||||
echo "%Software% is not installed"
|
||||
call %TMESSAGE% '"%Software% missing on %check_computername%"'
|
||||
)
|
||||
)
|
||||
|
||||
mklink C:\Users\%USERNAME%\Desktop\Wordpad "C:\Scripts\Wordpad\wordpad.exe"
|
||||
|
||||
exit /b
|
||||
|
||||
53
SystemChecks/test.bat
Normal file
53
SystemChecks/test.bat
Normal file
@ -0,0 +1,53 @@
|
||||
ECHO OFF
|
||||
set path=%PATH%;c:\daryoubutton;C:\Windows\twain_32\DY50TWAIN
|
||||
|
||||
|
||||
|
||||
|
||||
@echo off
|
||||
set directoryPath=C:\path\to\your\directory
|
||||
|
||||
REM Check if the directory exists
|
||||
if exist "%directoryPath%" (
|
||||
echo Directory %directoryPath% exists.
|
||||
) else (
|
||||
echo Directory %directoryPath% does not exist.
|
||||
)
|
||||
|
||||
exit /b
|
||||
|
||||
|
||||
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
REM Define the path to the LibreOffice installation
|
||||
set libreOfficePath="C:\Program Files\LibreOffice\program\soffice.exe"
|
||||
|
||||
REM Check if the computer name contains "reception"
|
||||
echo %COMPUTERNAME% | find /I "reception" >nul
|
||||
if errorlevel 1 (
|
||||
echo This script must be run on a machine with "reception" in its name.
|
||||
exit /b
|
||||
)
|
||||
|
||||
REM Check if LibreOffice is installed
|
||||
if exist %libreOfficePath% (
|
||||
echo LibreOffice is installed.
|
||||
) else (
|
||||
echo LibreOffice is not installed.
|
||||
)
|
||||
|
||||
endlocal
|
||||
exit /b
|
||||
|
||||
|
||||
|
||||
check exact
|
||||
check examinepro
|
||||
check daryou
|
||||
check kavo
|
||||
check libreoffice
|
||||
|
||||
|
||||
|
||||
@ -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,22 +71,56 @@ 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"
|
||||
@ -78,3 +128,17 @@ 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
|
||||
|
||||
@ -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,6 +71,14 @@ if "%check_computername%" EQU "RECEPTION4" (
|
||||
set PRINTER=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "RECEPTION5" (
|
||||
set PRINTER=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "RECEPTION6" (
|
||||
set PRINTER=1
|
||||
)
|
||||
|
||||
@REM if [%ZUPER%] == [1] (
|
||||
@REM echo "Not installing printers"
|
||||
@REM ) else (
|
||||
|
||||
@ -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,6 +71,14 @@ 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 (
|
||||
|
||||
@ -1,120 +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 "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 [%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
|
||||
@ -3,10 +3,15 @@ set check_computername=%COMPUTERNAME%
|
||||
echo "Found computer %check_computername%"
|
||||
|
||||
set PACKAGES=C:\Packages
|
||||
set WPUBLIC=C:\wPublic
|
||||
|
||||
set BASE=C:\Scripts\wBase
|
||||
set LOCAL=C:\Scripts\wLocal
|
||||
set SECRETS=C:\Scripts\Secrets
|
||||
set PUBLIC=C:\Scripts\Public
|
||||
|
||||
set WPUBLIC=C:\wPublic
|
||||
|
||||
set TMESSAGE=%BASE%\Msg\tmessage.bat
|
||||
set TMESSAGEH=%BASE%\Msg\tmessageH.bat
|
||||
|
||||
set POWERSHELL=%SYSTEMROOT%\system32\WindowsPowerShell\v1.0\powershell.exe
|
||||
|
||||
@ -3,6 +3,12 @@ call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
call C:\scripts\wpublic\bin\pull.bat
|
||||
@REM delete no longer needed files
|
||||
del c:\pull.bat
|
||||
del c:\scripts\wlocal\l_RunRegEditUpdates.bat
|
||||
del c:\scripts\wlocal\l_AddPrinters.bat
|
||||
|
||||
FOR %%x IN (%LOCAL%\l_*.bat) DO (
|
||||
echo "%%x"
|
||||
call "%%x"
|
||||
@ -13,4 +19,6 @@ FOR %%x IN (C:\Scripts\Secrets\l_*.bat) DO (
|
||||
call "%%x"
|
||||
)
|
||||
|
||||
|
||||
|
||||
echo "FINISHED: %~n0"
|
||||
@ -6,7 +6,6 @@ echo "%~n0: Start"
|
||||
ping -n 7 -i 7 192.8.1.1
|
||||
call %TMESSAGE% '"STARTED local %check_computername% "'
|
||||
|
||||
|
||||
if "%check_computername%" EQU "SERVER" (
|
||||
ping -n 7 -i 7 192.8.1.1
|
||||
call %TMESSAGEH% '" %check_computername% has STARTED "'
|
||||
|
||||
@ -4,9 +4,9 @@ call C:\Scripts\wLocal\localENV.bat
|
||||
echo "%~n0: Start"
|
||||
|
||||
|
||||
if exist Q:\HourlyLiveBackup2\ (
|
||||
if exist C:\Hourly-Internal-NAS\ (
|
||||
echo "Backup disk found"
|
||||
"C:\Program Files (x86)\BackupAssist v12\BackupAssistManualLauncher.exe" 2 -u -d
|
||||
"C:\Program Files (x86)\BackupAssist v14\BackupAssistManualLauncher.exe" 2 -u -d
|
||||
) else (
|
||||
echo "Backup disk NOT found"
|
||||
call %TMESSAGE% '"LOCAL hourly backup disk missing on %check_computername%"'
|
||||
|
||||
@ -4,9 +4,9 @@ call C:\Scripts\wLocal\localENV.bat
|
||||
echo "%~n0: Start"
|
||||
|
||||
|
||||
if exist Q:\HourlyLiveBackup2\ (
|
||||
if exist F:\Hourly-USB-LOCAL\ (
|
||||
echo "Backup disk found"
|
||||
"C:\Program Files (x86)\BackupAssist v12\BackupAssistManualLauncher.exe" 15 -u -d
|
||||
"C:\Program Files (x86)\BackupAssist v14\BackupAssistManualLauncher.exe" 15 -u -d
|
||||
) else (
|
||||
echo "Backup disk NOT found"
|
||||
call %TMESSAGE% '"LOCAL hourly backup disk missing on %check_computername%"'
|
||||
|
||||
5
tester.bat
Normal file
5
tester.bat
Normal file
@ -0,0 +1,5 @@
|
||||
call C:\Scripts\wBase\baseENV.bat
|
||||
call C:\Scripts\wLocal\localENV.bat
|
||||
|
||||
echo %DONKEY%
|
||||
echo %BASE%
|
||||
Reference in New Issue
Block a user