.
This commit is contained in:
96
SystemChecks/test.bat
Normal file
96
SystemChecks/test.bat
Normal file
@ -0,0 +1,96 @@
|
||||
ECHO OFF
|
||||
set path=%PATH%;c:\daryoubutton;C:\Windows\twain_32\DY50TWAIN
|
||||
|
||||
|
||||
|
||||
@echo off
|
||||
set printerPath=\\server2\zebra
|
||||
|
||||
REM Check if the server is reachable
|
||||
ping -n 1 server2 >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo Server is not reachable.
|
||||
exit /b
|
||||
)
|
||||
|
||||
REM Check if the printer is available
|
||||
rundll32 printui.dll,PrintUIEntry /q /s /t1 /n "%printerPath%" >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo Printer %printerPath% is not available.
|
||||
) else (
|
||||
echo Printer %printerPath% is available.
|
||||
)
|
||||
|
||||
exit /b
|
||||
|
||||
|
||||
@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 script is running on reception2
|
||||
if /I "%COMPUTERNAME%" NEQ "reception2" (
|
||||
echo This script must be run on reception2.
|
||||
exit /b
|
||||
)
|
||||
|
||||
REM Check if LibreOffice is installed
|
||||
if exist %libreOfficePath% (
|
||||
echo LibreOffice is installed.
|
||||
) else (
|
||||
echo LibreOffice is not installed.
|
||||
)
|
||||
|
||||
endlocal
|
||||
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 printers
|
||||
check exact
|
||||
check examinepro
|
||||
check daryou
|
||||
check kavo
|
||||
check libreoffice
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user