Initial Release Batch Version
This commit is contained in:
commit
c1383fcd0c
26 changed files with 1783 additions and 0 deletions
108
Assets/BROTHER/Simple Brother SW Farbe.bat
Normal file
108
Assets/BROTHER/Simple Brother SW Farbe.bat
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
@echo off
|
||||
:: Prüfe, ob Admin-Rechte vorhanden sind
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Starte Skript mit Admin-Rechten ...
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
:: IP-Adresse eingeben
|
||||
set /p PRINTER_IP="Gib die IP-Adresse des Druckers ein: "
|
||||
|
||||
:: Druckernamen eingeben
|
||||
set /p PRINTER_NAME="Gib den Namen des Druckers ein (ohne SW/Farbe): "
|
||||
|
||||
:: Standarddrucker-Liste setzen (SW und Farbe)
|
||||
set PRINTER_LIST="%PRINTER_NAME% (SW)" "%PRINTER_NAME% (Farbe)"
|
||||
|
||||
:default_path
|
||||
:: Nutzt automatisch den Pfad der Batch-Datei
|
||||
set BASE_PATH=%~dp0
|
||||
set DRIVER_PATH=%BASE_PATH%Brother-treiber
|
||||
set DELETE_DRIVER_PATH=1
|
||||
echo Verwende automatisch den Treiberordner: %DRIVER_PATH%
|
||||
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Treiber nicht gefunden! Lade ihn herunter...
|
||||
|
||||
:: Treiber von HP herunterladen
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/scl/fi/okl4na8rceyw20nnm55g6/Brother-Treiber.zip?rlkey=q4cb8ffk420qk0p0v70e5k15t&st=pc26u61r&dl=1', '%BASE_PATH%Brother-treiber.zip')"
|
||||
|
||||
:: Pruefen, ob der Download erfolgreich war
|
||||
if not exist "%BASE_PATH%Brother-treiber.zip" (
|
||||
echo Fehler: Der Treiber konnte nicht heruntergeladen werden!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entpacke den Treiber...
|
||||
powershell -Command "Expand-Archive -Path '%BASE_PATH%Brother-treiber.zip' -DestinationPath '%BASE_PATH%Brother-treiber' -Force"
|
||||
|
||||
:: Pruefen, ob das Entpacken erfolgreich war
|
||||
if not exist "%BASE_PATH%Brother-treiber" (
|
||||
echo Fehler: Das Entpacken ist fehlgeschlagen!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entferne die ZIP-Datei...
|
||||
del "%BASE_PATH%Brother-treiber.zip"
|
||||
|
||||
echo Treiber wurde erfolgreich heruntergeladen und entpackt.
|
||||
)
|
||||
|
||||
GOTO check_path
|
||||
|
||||
:check_path
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Fehler: Der Treiberordner "%DRIVER_PATH%" existiert nicht!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
|
||||
:: Port erstellen
|
||||
echo Erstelle TCP/IP-Port...
|
||||
cscript "%WINDIR%\System32\Printing_Admin_Scripts\de-DE\prnport.vbs" -a -r %PRINTER_IP% -h %PRINTER_IP% -o raw
|
||||
|
||||
|
||||
:: Druckertreiber installieren (automatische INF-Suche in PCL6\64bit)
|
||||
echo Installiere Druckertreiber aus: %DRIVER_PATH%\PCL6\64bit ...
|
||||
pnputil /add-driver "%DRIVER_PATH%\GER\BHPCL5E.inf" /install
|
||||
|
||||
:: Drucker installieren (inklusive der zusaetzlichen Drucker)
|
||||
for %%P in (%PRINTER_LIST%) do (
|
||||
echo Installiere Drucker: %%P ...
|
||||
rundll32 printui.dll,PrintUIEntry /if /b %%P /r "%PRINTER_IP%" /m "Brother PCLXL Generic Driver"
|
||||
)
|
||||
|
||||
:: Nach Installation den Registry-Wert für SW-Drucker setzen
|
||||
echo Setze Standarddrucker-Einstellungen nach OH5 Standard...
|
||||
powershell -ExecutionPolicy Bypass -File "%BASE_PATH%do_default_printersettings.ps1" -PrinterName "%PRINTER_NAME%"
|
||||
|
||||
|
||||
:: Standarddrucker setzen
|
||||
set /p SET_DEFAULT="Soll '%PRINTER_NAME% (SW)' als Standard gesetzt werden? (J/N): "
|
||||
IF /I "%SET_DEFAULT%"=="J" GOTO set_default
|
||||
GOTO cleanup
|
||||
|
||||
:set_default
|
||||
rundll32 printui.dll,PrintUIEntry /y /n "%PRINTER_NAME% (SW)"
|
||||
echo "%PRINTER_NAME% (SW)" ist jetzt der Standarddrucker.
|
||||
|
||||
:cleanup
|
||||
:: Treiberordner loeschen, nur wenn der Benutzer "N" gewaehlt hat
|
||||
if "%DELETE_DRIVER_PATH%"=="1" (
|
||||
if exist "%DRIVER_PATH%" (
|
||||
echo Entferne den heruntergeladenen Treiberordner...
|
||||
rmdir /s /q "%DRIVER_PATH%"
|
||||
echo Treiberordner erfolgreich geloescht.
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
echo Installation abgeschlossen.
|
||||
pause
|
||||
109
Assets/BROTHER/Simple Brother SW.bat
Normal file
109
Assets/BROTHER/Simple Brother SW.bat
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
@echo off
|
||||
:: Prüfe, ob Admin-Rechte vorhanden sind
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Starte Skript mit Admin-Rechten ...
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
:: IP-Adresse eingeben
|
||||
set /p PRINTER_IP="Gib die IP-Adresse des Druckers ein: "
|
||||
|
||||
:: Druckernamen eingeben
|
||||
set /p PRINTER_NAME="Gib den Namen des Druckers ein: "
|
||||
|
||||
:: Standarddrucker-Liste setzen (SW und Farbe)
|
||||
set PRINTER_LIST="%PRINTER_NAME%"
|
||||
|
||||
:default_path
|
||||
:: Nutzt automatisch den Pfad der Batch-Datei
|
||||
set BASE_PATH=%~dp0
|
||||
set DRIVER_PATH=%BASE_PATH%Brother-treiber
|
||||
set DELETE_DRIVER_PATH=1
|
||||
echo Verwende automatisch den Treiberordner: %DRIVER_PATH%
|
||||
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Treiber nicht gefunden! Lade ihn herunter...
|
||||
|
||||
:: Treiber von HP herunterladen
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/scl/fi/okl4na8rceyw20nnm55g6/Brother-Treiber.zip?rlkey=q4cb8ffk420qk0p0v70e5k15t&st=pc26u61r&dl=1', '%BASE_PATH%Brother-treiber.zip')"
|
||||
|
||||
:: Pruefen, ob der Download erfolgreich war
|
||||
if not exist "%BASE_PATH%Brother-treiber.zip" (
|
||||
echo Fehler: Der Treiber konnte nicht heruntergeladen werden!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entpacke den Treiber...
|
||||
powershell -Command "Expand-Archive -Path '%BASE_PATH%Brother-treiber.zip' -DestinationPath '%BASE_PATH%Brother-treiber' -Force"
|
||||
|
||||
:: Pruefen, ob das Entpacken erfolgreich war
|
||||
if not exist "%BASE_PATH%Brother-treiber" (
|
||||
echo Fehler: Das Entpacken ist fehlgeschlagen!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entferne die ZIP-Datei...
|
||||
del "%BASE_PATH%Brother-treiber.zip"
|
||||
|
||||
echo Treiber wurde erfolgreich heruntergeladen und entpackt.
|
||||
)
|
||||
|
||||
GOTO check_path
|
||||
|
||||
:check_path
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Fehler: Der Treiberordner "%DRIVER_PATH%" existiert nicht!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
|
||||
:: Port erstellen
|
||||
echo Erstelle TCP/IP-Port...
|
||||
cscript "%WINDIR%\System32\Printing_Admin_Scripts\de-DE\prnport.vbs" -a -r %PRINTER_IP% -h %PRINTER_IP% -o raw
|
||||
|
||||
|
||||
:: Druckertreiber installieren (automatische INF-Suche in PCL6\64bit)
|
||||
echo Installiere Druckertreiber aus: %DRIVER_PATH%\PCL6\64bit ...
|
||||
pnputil /add-driver "%DRIVER_PATH%\GER\BHPCL5E.inf" /install
|
||||
|
||||
:: Drucker installieren (inklusive der zusaetzlichen Drucker)
|
||||
for %%P in (%PRINTER_LIST%) do (
|
||||
echo Installiere Drucker: %%P ...
|
||||
rundll32 printui.dll,PrintUIEntry /if /b %%P /r "%PRINTER_IP%" /m "Brother PCLXL Generic Driver"
|
||||
)
|
||||
|
||||
:: Nach Installation den Registry-Wert für SW-Drucker setzen
|
||||
echo Setze Standarddrucker-Einstellungen nach OH5 Standard...
|
||||
powershell -ExecutionPolicy Bypass -File "%BASE_PATH%do_default_printersettings_mono.ps1" -PrinterName "%PRINTER_NAME%"
|
||||
|
||||
|
||||
|
||||
:: Standarddrucker setzen
|
||||
set /p SET_DEFAULT="Soll '%PRINTER_NAME%' als Standard gesetzt werden? (J/N): "
|
||||
IF /I "%SET_DEFAULT%"=="J" GOTO set_default
|
||||
GOTO cleanup
|
||||
|
||||
:set_default
|
||||
rundll32 printui.dll,PrintUIEntry /y /n "%PRINTER_NAME%"
|
||||
echo "%PRINTER_NAME%" ist jetzt der Standarddrucker.
|
||||
|
||||
:cleanup
|
||||
:: Treiberordner loeschen, nur wenn der Benutzer "N" gewaehlt hat
|
||||
if "%DELETE_DRIVER_PATH%"=="1" (
|
||||
if exist "%DRIVER_PATH%" (
|
||||
echo Entferne den heruntergeladenen Treiberordner...
|
||||
rmdir /s /q "%DRIVER_PATH%"
|
||||
echo Treiberordner erfolgreich geloescht.
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
echo Installation abgeschlossen.
|
||||
pause
|
||||
27
Assets/BROTHER/do_default_printersettings.ps1
Normal file
27
Assets/BROTHER/do_default_printersettings.ps1
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
param (
|
||||
[string]$PrinterName
|
||||
)
|
||||
|
||||
try {
|
||||
# Druckername fuer Schwarz-Weiß und Farbe generieren
|
||||
$PrinterNameSW = "$PrinterName (SW)"
|
||||
$PrinterNameColor = "$PrinterName (Farbe)"
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameSW ..."
|
||||
|
||||
# Setze den Druckmodus fuer Schwarz-Weiß auf Monochrome
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -Color $false
|
||||
|
||||
# Duplex fuer Schwarz-Weiß deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -DuplexingMode OneSided
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameColor ..."
|
||||
|
||||
# Duplex fuer Farbe deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameColor -DuplexingMode OneSided
|
||||
|
||||
Write-Host "Fertig! Alle Einstellungen wurden erfolgreich gesetzt."
|
||||
}
|
||||
catch {
|
||||
Write-Host "Fehler: Konnte die Druckereinstellung nicht ändern. ueberpruefe, ob die Drucker '$PrinterNameSW' und '$PrinterNameColor' existieren!"
|
||||
}
|
||||
18
Assets/BROTHER/do_default_printersettings_mono.ps1
Normal file
18
Assets/BROTHER/do_default_printersettings_mono.ps1
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
param (
|
||||
[string]$PrinterName
|
||||
)
|
||||
|
||||
try {
|
||||
# Druckername fuer Schwarz-Weiß und Farbe generieren
|
||||
$PrinterNameSW = "$PrinterName"
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameSW ..."
|
||||
|
||||
|
||||
# Duplex fuer Schwarz-Weiß deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -DuplexingMode OneSided
|
||||
|
||||
}
|
||||
catch {
|
||||
Write-Host "Fehler: Konnte die Druckereinstellung nicht ändern. ueberpruefe, ob die Drucker '$PrinterNameSW' und '$PrinterNameColor' existieren!"
|
||||
}
|
||||
108
Assets/EPSON/Simple Epson SW Farbe.bat
Normal file
108
Assets/EPSON/Simple Epson SW Farbe.bat
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
@echo off
|
||||
:: Prüfe, ob Admin-Rechte vorhanden sind
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Starte Skript mit Admin-Rechten ...
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
:: IP-Adresse eingeben
|
||||
set /p PRINTER_IP="Gib die IP-Adresse des Druckers ein: "
|
||||
|
||||
:: Druckernamen eingeben
|
||||
set /p PRINTER_NAME="Gib den Namen des Druckers ein (ohne SW/Farbe): "
|
||||
|
||||
:: Standarddrucker-Liste setzen (SW und Farbe)
|
||||
set PRINTER_LIST="%PRINTER_NAME% (SW)" "%PRINTER_NAME% (Farbe)"
|
||||
|
||||
:default_path
|
||||
:: Nutzt automatisch den Pfad der Batch-Datei
|
||||
set BASE_PATH=%~dp0
|
||||
set DRIVER_PATH=%BASE_PATH%Epson-treiber
|
||||
set DELETE_DRIVER_PATH=1
|
||||
echo Verwende automatisch den Treiberordner: %DRIVER_PATH%
|
||||
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Treiber nicht gefunden! Lade ihn herunter...
|
||||
|
||||
:: Treiber von HP herunterladen
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/scl/fi/sxatei3to2nhd97r82dlx/Epson-Treiber.zip?rlkey=q600xpse65gvrbrxqdi8305ta&st=xvxyv84f&dl=1', '%BASE_PATH%Epson-treiber.zip')"
|
||||
|
||||
:: Pruefen, ob der Download erfolgreich war
|
||||
if not exist "%BASE_PATH%Epson-treiber.zip" (
|
||||
echo Fehler: Der Treiber konnte nicht heruntergeladen werden!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entpacke den Treiber...
|
||||
powershell -Command "Expand-Archive -Path '%BASE_PATH%Epson-treiber.zip' -DestinationPath '%BASE_PATH%Epson-treiber' -Force"
|
||||
|
||||
:: Pruefen, ob das Entpacken erfolgreich war
|
||||
if not exist "%BASE_PATH%Epson-treiber" (
|
||||
echo Fehler: Das Entpacken ist fehlgeschlagen!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entferne die ZIP-Datei...
|
||||
del "%BASE_PATH%Epson-treiber.zip"
|
||||
|
||||
echo Treiber wurde erfolgreich heruntergeladen und entpackt.
|
||||
)
|
||||
|
||||
GOTO check_path
|
||||
|
||||
:check_path
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Fehler: Der Treiberordner "%DRIVER_PATH%" existiert nicht!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
|
||||
:: Port erstellen
|
||||
echo Erstelle TCP/IP-Port...
|
||||
cscript "%WINDIR%\System32\Printing_Admin_Scripts\de-DE\prnport.vbs" -a -r %PRINTER_IP% -h %PRINTER_IP% -o raw
|
||||
|
||||
|
||||
:: Druckertreiber installieren (automatische INF-Suche in PCL6\64bit)
|
||||
echo Installiere Druckertreiber aus: %DRIVER_PATH%\PCL6\64bit ...
|
||||
pnputil /add-driver "%DRIVER_PATH%\Universal_Print_Driver_x64_29000\E_JFB0DE.inf" /install
|
||||
|
||||
:: Drucker installieren (inklusive der zusaetzlichen Drucker)
|
||||
for %%P in (%PRINTER_LIST%) do (
|
||||
echo Installiere Drucker: %%P ...
|
||||
rundll32 printui.dll,PrintUIEntry /if /b %%P /r "%PRINTER_IP%" /m "EPSON Universal Print Driver"
|
||||
)
|
||||
|
||||
:: Nach Installation den Registry-Wert für SW-Drucker setzen
|
||||
echo Setze Standarddrucker-Einstellungen nach OH5 Standard...
|
||||
powershell -ExecutionPolicy Bypass -File "%BASE_PATH%do_default_printersettings.ps1" -PrinterName "%PRINTER_NAME%"
|
||||
|
||||
|
||||
:: Standarddrucker setzen
|
||||
set /p SET_DEFAULT="Soll '%PRINTER_NAME% (SW)' als Standard gesetzt werden? (J/N): "
|
||||
IF /I "%SET_DEFAULT%"=="J" GOTO set_default
|
||||
GOTO cleanup
|
||||
|
||||
:set_default
|
||||
rundll32 printui.dll,PrintUIEntry /y /n "%PRINTER_NAME% (SW)"
|
||||
echo "%PRINTER_NAME% (SW)" ist jetzt der Standarddrucker.
|
||||
|
||||
:cleanup
|
||||
:: Treiberordner loeschen, nur wenn der Benutzer "N" gewaehlt hat
|
||||
if "%DELETE_DRIVER_PATH%"=="1" (
|
||||
if exist "%DRIVER_PATH%" (
|
||||
echo Entferne den heruntergeladenen Treiberordner...
|
||||
rmdir /s /q "%DRIVER_PATH%"
|
||||
echo Treiberordner erfolgreich geloescht.
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
echo Installation abgeschlossen.
|
||||
pause
|
||||
108
Assets/EPSON/Simple Epson SW.bat
Normal file
108
Assets/EPSON/Simple Epson SW.bat
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
@echo off
|
||||
:: Prüfe, ob Admin-Rechte vorhanden sind
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Starte Skript mit Admin-Rechten ...
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
:: IP-Adresse eingeben
|
||||
set /p PRINTER_IP="Gib die IP-Adresse des Druckers ein: "
|
||||
|
||||
:: Druckernamen eingeben
|
||||
set /p PRINTER_NAME="Gib den Namen des Druckers ein: "
|
||||
|
||||
:: Standarddrucker-Liste setzen (SW und Farbe)
|
||||
set PRINTER_LIST="%PRINTER_NAME%"
|
||||
|
||||
:default_path
|
||||
:: Nutzt automatisch den Pfad der Batch-Datei
|
||||
set BASE_PATH=%~dp0
|
||||
set DRIVER_PATH=%BASE_PATH%Epson-treiber
|
||||
set DELETE_DRIVER_PATH=1
|
||||
echo Verwende automatisch den Treiberordner: %DRIVER_PATH%
|
||||
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Treiber nicht gefunden! Lade ihn herunter...
|
||||
|
||||
:: Treiber von HP herunterladen
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/scl/fi/sxatei3to2nhd97r82dlx/Epson-Treiber.zip?rlkey=q600xpse65gvrbrxqdi8305ta&st=xvxyv84f&dl=1', '%BASE_PATH%Epson-treiber.zip')"
|
||||
|
||||
:: Pruefen, ob der Download erfolgreich war
|
||||
if not exist "%BASE_PATH%Epson-treiber.zip" (
|
||||
echo Fehler: Der Treiber konnte nicht heruntergeladen werden!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entpacke den Treiber...
|
||||
powershell -Command "Expand-Archive -Path '%BASE_PATH%Epson-treiber.zip' -DestinationPath '%BASE_PATH%Epson-treiber' -Force"
|
||||
|
||||
:: Pruefen, ob das Entpacken erfolgreich war
|
||||
if not exist "%BASE_PATH%Epson-treiber" (
|
||||
echo Fehler: Das Entpacken ist fehlgeschlagen!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entferne die ZIP-Datei...
|
||||
del "%BASE_PATH%Epson-treiber.zip"
|
||||
|
||||
echo Treiber wurde erfolgreich heruntergeladen und entpackt.
|
||||
)
|
||||
|
||||
GOTO check_path
|
||||
|
||||
:check_path
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Fehler: Der Treiberordner "%DRIVER_PATH%" existiert nicht!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
|
||||
:: Port erstellen
|
||||
echo Erstelle TCP/IP-Port...
|
||||
cscript "%WINDIR%\System32\Printing_Admin_Scripts\de-DE\prnport.vbs" -a -r %PRINTER_IP% -h %PRINTER_IP% -o raw
|
||||
|
||||
|
||||
:: Druckertreiber installieren (automatische INF-Suche in PCL6\64bit)
|
||||
echo Installiere Druckertreiber aus: %DRIVER_PATH%\PCL6\64bit ...
|
||||
pnputil /add-driver "%DRIVER_PATH%\Universal_Print_Driver_x64_29000\E_JFB0DE.inf" /install
|
||||
|
||||
:: Drucker installieren (inklusive der zusaetzlichen Drucker)
|
||||
for %%P in (%PRINTER_LIST%) do (
|
||||
echo Installiere Drucker: %%P ...
|
||||
rundll32 printui.dll,PrintUIEntry /if /b %%P /r "%PRINTER_IP%" /m "EPSON Universal Print Driver"
|
||||
)
|
||||
|
||||
:: Nach Installation den Registry-Wert für SW-Drucker setzen
|
||||
echo Setze Standarddrucker-Einstellungen nach OH5 Standard...
|
||||
powershell -ExecutionPolicy Bypass -File "%BASE_PATH%do_default_printersettings_mono.ps1" -PrinterName "%PRINTER_NAME%"
|
||||
|
||||
|
||||
:: Standarddrucker setzen
|
||||
set /p SET_DEFAULT="Soll '%PRINTER_NAME%' als Standard gesetzt werden? (J/N): "
|
||||
IF /I "%SET_DEFAULT%"=="J" GOTO set_default
|
||||
GOTO cleanup
|
||||
|
||||
:set_default
|
||||
rundll32 printui.dll,PrintUIEntry /y /n "%PRINTER_NAME%"
|
||||
echo "%PRINTER_NAME%" ist jetzt der Standarddrucker.
|
||||
|
||||
:cleanup
|
||||
:: Treiberordner loeschen, nur wenn der Benutzer "N" gewaehlt hat
|
||||
if "%DELETE_DRIVER_PATH%"=="1" (
|
||||
if exist "%DRIVER_PATH%" (
|
||||
echo Entferne den heruntergeladenen Treiberordner...
|
||||
rmdir /s /q "%DRIVER_PATH%"
|
||||
echo Treiberordner erfolgreich geloescht.
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
echo Installation abgeschlossen.
|
||||
pause
|
||||
27
Assets/EPSON/do_default_printersettings.ps1
Normal file
27
Assets/EPSON/do_default_printersettings.ps1
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
param (
|
||||
[string]$PrinterName
|
||||
)
|
||||
|
||||
try {
|
||||
# Druckername fuer Schwarz-Weiß und Farbe generieren
|
||||
$PrinterNameSW = "$PrinterName (SW)"
|
||||
$PrinterNameColor = "$PrinterName (Farbe)"
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameSW ..."
|
||||
|
||||
# Setze den Druckmodus fuer Schwarz-Weiß auf Monochrome
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -Color $false
|
||||
|
||||
# Duplex fuer Schwarz-Weiß deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -DuplexingMode OneSided
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameColor ..."
|
||||
|
||||
# Duplex fuer Farbe deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameColor -DuplexingMode OneSided
|
||||
|
||||
Write-Host "Fertig! Alle Einstellungen wurden erfolgreich gesetzt."
|
||||
}
|
||||
catch {
|
||||
Write-Host "Fehler: Konnte die Druckereinstellung nicht ändern. ueberpruefe, ob die Drucker '$PrinterNameSW' und '$PrinterNameColor' existieren!"
|
||||
}
|
||||
18
Assets/EPSON/do_default_printersettings_mono.ps1
Normal file
18
Assets/EPSON/do_default_printersettings_mono.ps1
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
param (
|
||||
[string]$PrinterName
|
||||
)
|
||||
|
||||
try {
|
||||
# Druckername fuer Schwarz-Weiß und Farbe generieren
|
||||
$PrinterNameSW = "$PrinterName"
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameSW ..."
|
||||
|
||||
|
||||
# Duplex fuer Schwarz-Weiß deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -DuplexingMode OneSided
|
||||
|
||||
}
|
||||
catch {
|
||||
Write-Host "Fehler: Konnte die Druckereinstellung nicht ändern. ueberpruefe, ob die Drucker '$PrinterNameSW' und '$PrinterNameColor' existieren!"
|
||||
}
|
||||
148
Assets/HP/Advanced HP SW&Farbe.bat
Normal file
148
Assets/HP/Advanced HP SW&Farbe.bat
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
@echo off
|
||||
REM Quick test for Windows generation: UAC aware or not ; all OS before NT4 ignored for simplicity
|
||||
SET NewOSWith_UAC=YES
|
||||
VER | FINDSTR /IL "5." > NUL
|
||||
IF %ERRORLEVEL% == 0 SET NewOSWith_UAC=NO
|
||||
VER | FINDSTR /IL "4." > NUL
|
||||
IF %ERRORLEVEL% == 0 SET NewOSWith_UAC=NO
|
||||
|
||||
|
||||
REM Test if Admin
|
||||
CALL NET SESSION >nul 2>&1
|
||||
IF NOT %ERRORLEVEL% == 0 (
|
||||
|
||||
if /i "%NewOSWith_UAC%"=="YES" (
|
||||
rem Start batch again with UAC
|
||||
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
|
||||
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
|
||||
"%temp%\getadmin.vbs"
|
||||
del "%temp%\getadmin.vbs"
|
||||
exit /B
|
||||
)
|
||||
|
||||
rem Program will now start again automatically with admin rights!
|
||||
rem pause
|
||||
goto :eof
|
||||
)
|
||||
|
||||
:: IP-Adresse eingeben
|
||||
set /p PRINTER_IP="Gib die IP-Adresse des Druckers ein: "
|
||||
|
||||
:: Druckernamen eingeben
|
||||
set /p PRINTER_NAME="Gib den Namen des Druckers ein (ohne SW/Farbe): "
|
||||
|
||||
:: Standarddrucker-Liste setzen (SW und Farbe)
|
||||
set PRINTER_LIST="%PRINTER_NAME% (SW)" "%PRINTER_NAME% (Farbe)"
|
||||
|
||||
|
||||
:: Treiberpfad-Abfrage
|
||||
set /p CUSTOM_PATH="Willst du einen eigenen Treiberpfad eingeben? (J/N): "
|
||||
|
||||
IF /I "%CUSTOM_PATH%"=="J" GOTO custom_path
|
||||
IF /I "%CUSTOM_PATH%"=="N" GOTO default_path
|
||||
|
||||
ECHO Ungueltige Eingabe, bitte J oder N eingeben.
|
||||
GOTO end
|
||||
|
||||
:custom_path
|
||||
set /p DRIVER_PATH="Gib den Pfad zum Treiberordner an: "
|
||||
set DELETE_DRIVER_PATH=0
|
||||
GOTO check_path
|
||||
|
||||
:default_path
|
||||
:: Nutzt automatisch den Pfad der Batch-Datei
|
||||
set BASE_PATH=%~dp0
|
||||
set DRIVER_PATH=%BASE_PATH%hp-treiber
|
||||
set DELETE_DRIVER_PATH=1
|
||||
echo Verwende automatisch den Treiberordner: %DRIVER_PATH%
|
||||
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Treiber nicht gefunden! Lade ihn herunter...
|
||||
|
||||
:: Treiber von HP herunterladen
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://ftp.hp.com/pub/softlib/software13/printers/UPD/upd-pcl6-x64-7.3.0.25919.zip', '%BASE_PATH%hp-treiber.zip')"
|
||||
|
||||
:: Pruefen, ob der Download erfolgreich war
|
||||
if not exist "%BASE_PATH%hp-treiber.zip" (
|
||||
echo Fehler: Der Treiber konnte nicht heruntergeladen werden!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entpacke den Treiber...
|
||||
powershell -Command "Expand-Archive -Path '%BASE_PATH%hp-treiber.zip' -DestinationPath '%BASE_PATH%hp-treiber' -Force"
|
||||
|
||||
:: Pruefen, ob das Entpacken erfolgreich war
|
||||
if not exist "%BASE_PATH%hp-treiber" (
|
||||
echo Fehler: Das Entpacken ist fehlgeschlagen!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entferne die ZIP-Datei...
|
||||
del "%BASE_PATH%hp-treiber.zip"
|
||||
|
||||
echo Treiber wurde erfolgreich heruntergeladen und entpackt.
|
||||
)
|
||||
|
||||
GOTO check_path
|
||||
|
||||
:check_path
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Fehler: Der Treiberordner "%DRIVER_PATH%" existiert nicht!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Port erstellen
|
||||
echo Erstelle TCP/IP-Port...
|
||||
|
||||
for /f %%P in ('cscript //nologo "%WINDIR%\System32\Printing_Admin_Scripts\de-DE\prnport.vbs" -l ^| findstr /i "%PRINTER_IP%"') do (
|
||||
set PORT_EXISTS=true
|
||||
echo Port found
|
||||
)
|
||||
|
||||
if %PORT_EXISTS% equ true (
|
||||
echo Port nicht gefunden, erstelle Port...
|
||||
cscript "%WINDIR%\System32\Printing_Admin_Scripts\de-DE\prnport.vbs" -a -r %PRINTER_IP% -h %PRINTER_IP% -o raw
|
||||
)
|
||||
|
||||
:: Druckertreiber installieren (automatische INF-Suche)
|
||||
echo Installiere Druckertreiber aus: %DRIVER_PATH% ...
|
||||
pnputil /add-driver "%DRIVER_PATH%\*.inf" /install
|
||||
|
||||
:: Drucker installieren (inklusive der zusaetzlichen Drucker)
|
||||
for %%P in (%PRINTER_LIST%) do (
|
||||
echo Installiere Drucker: %%P ...
|
||||
rundll32 printui.dll,PrintUIEntry /if /b %%P /r "%PRINTER_IP%" /m "HP Universal Printing PCL 6"
|
||||
)
|
||||
|
||||
:: Nach Installation den Registry-Wert für SW-Drucker setzen
|
||||
echo Setze Standarddrucker-Einstellungen nach OH5 Standard...
|
||||
powershell -ExecutionPolicy Bypass -File "%BASE_PATH%do_default_printersettings.ps1" -PrinterName "%PRINTER_NAME% (SW)"
|
||||
|
||||
|
||||
:: Standarddrucker setzen
|
||||
set /p SET_DEFAULT="Soll '%PRINTER_NAME% (SW)' als Standard gesetzt werden? (J/N): "
|
||||
IF /I "%SET_DEFAULT%"=="J" GOTO set_default
|
||||
GOTO cleanup
|
||||
|
||||
:set_default
|
||||
rundll32 printui.dll,PrintUIEntry /y /n "%PRINTER_NAME% (SW)"
|
||||
echo "%PRINTER_NAME% (SW)" ist jetzt der Standarddrucker.
|
||||
|
||||
:cleanup
|
||||
:: Treiberordner loeschen, nur wenn der Benutzer "N" gewaehlt hat
|
||||
if "%DELETE_DRIVER_PATH%"=="1" (
|
||||
if exist "%DRIVER_PATH%" (
|
||||
echo Entferne den heruntergeladenen Treiberordner...
|
||||
rmdir /s /q "%DRIVER_PATH%"
|
||||
echo Treiberordner erfolgreich geloescht.
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
echo Installation abgeschlossen.
|
||||
pause
|
||||
108
Assets/HP/Simple HP SW Farbe.bat
Normal file
108
Assets/HP/Simple HP SW Farbe.bat
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
@echo off
|
||||
|
||||
:: Prüfe, ob Admin-Rechte vorhanden sind
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Starte Skript mit Admin-Rechten ...
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
:: IP-Adresse eingeben
|
||||
set /p PRINTER_IP="Gib die IP-Adresse des Druckers ein: "
|
||||
|
||||
:: Druckernamen eingeben
|
||||
set /p PRINTER_NAME="Gib den Namen des Druckers ein (ohne SW/Farbe): "
|
||||
|
||||
:: Standarddrucker-Liste setzen (SW und Farbe)
|
||||
set PRINTER_LIST="%PRINTER_NAME% (SW)" "%PRINTER_NAME% (Farbe)"
|
||||
|
||||
:default_path
|
||||
:: Nutzt automatisch den Pfad der Batch-Datei
|
||||
set BASE_PATH=%~dp0
|
||||
set DRIVER_PATH=%BASE_PATH%hp-treiber
|
||||
set DELETE_DRIVER_PATH=1
|
||||
echo Verwende automatisch den Treiberordner: %DRIVER_PATH%
|
||||
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Treiber nicht gefunden! Lade ihn herunter...
|
||||
|
||||
:: Treiber von HP herunterladen
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/scl/fi/6ramq1o0lidso43pumi49/HP-Treiber.zip?rlkey=kizmngce43vrojylkwxe8eoof&st=7bcjoj4j&dl=1', '%BASE_PATH%hp-treiber.zip')"
|
||||
|
||||
:: Pruefen, ob der Download erfolgreich war
|
||||
if not exist "%BASE_PATH%hp-treiber.zip" (
|
||||
echo Fehler: Der Treiber konnte nicht heruntergeladen werden!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entpacke den Treiber...
|
||||
powershell -Command "Expand-Archive -Path '%BASE_PATH%hp-treiber.zip' -DestinationPath '%BASE_PATH%hp-treiber' -Force"
|
||||
|
||||
:: Pruefen, ob das Entpacken erfolgreich war
|
||||
if not exist "%BASE_PATH%hp-treiber" (
|
||||
echo Fehler: Das Entpacken ist fehlgeschlagen!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entferne die ZIP-Datei...
|
||||
del "%BASE_PATH%hp-treiber.zip"
|
||||
|
||||
echo Treiber wurde erfolgreich heruntergeladen und entpackt.
|
||||
)
|
||||
|
||||
GOTO check_path
|
||||
|
||||
:check_path
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Fehler: Der Treiberordner "%DRIVER_PATH%" existiert nicht!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Port erstellen
|
||||
echo Erstelle TCP/IP-Port...
|
||||
cscript "%WINDIR%\System32\Printing_Admin_Scripts\de-DE\prnport.vbs" -a -r %PRINTER_IP% -h %PRINTER_IP% -o raw
|
||||
|
||||
|
||||
:: Druckertreiber installieren (automatische INF-Suche)
|
||||
echo Installiere Druckertreiber aus: %DRIVER_PATH% ...
|
||||
pnputil /add-driver "%DRIVER_PATH%\hpbuio200le.inf" /install
|
||||
|
||||
:: Drucker installieren (inklusive der zusaetzlichen Drucker)
|
||||
for %%P in (%PRINTER_LIST%) do (
|
||||
echo Installiere Drucker: %%P ...
|
||||
rundll32 printui.dll,PrintUIEntry /if /b %%P /r "%PRINTER_IP%" /m "HP Universal Printing PCL 6"
|
||||
)
|
||||
|
||||
:: Nach Installation den Registry-Wert für SW-Drucker setzen
|
||||
echo Setze Standarddrucker-Einstellungen nach OH5 Standard...
|
||||
powershell -ExecutionPolicy Bypass -File "%BASE_PATH%do_default_printersettings.ps1" -PrinterName "%PRINTER_NAME%"
|
||||
|
||||
|
||||
:: Standarddrucker setzen
|
||||
set /p SET_DEFAULT="Soll '%PRINTER_NAME% (SW)' als Standard gesetzt werden? (J/N): "
|
||||
IF /I "%SET_DEFAULT%"=="J" GOTO set_default
|
||||
GOTO cleanup
|
||||
|
||||
:set_default
|
||||
rundll32 printui.dll,PrintUIEntry /y /n "%PRINTER_NAME% (SW)"
|
||||
echo "%PRINTER_NAME% (SW)" ist jetzt der Standarddrucker.
|
||||
|
||||
:cleanup
|
||||
:: Treiberordner loeschen, nur wenn der Benutzer "N" gewaehlt hat
|
||||
if "%DELETE_DRIVER_PATH%"=="1" (
|
||||
if exist "%DRIVER_PATH%" (
|
||||
echo Entferne den heruntergeladenen Treiberordner...
|
||||
rmdir /s /q "%DRIVER_PATH%"
|
||||
echo Treiberordner erfolgreich geloescht.
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
echo Installation abgeschlossen.
|
||||
pause
|
||||
107
Assets/HP/Simple HP SW.bat
Normal file
107
Assets/HP/Simple HP SW.bat
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
@echo off
|
||||
:: Prüfe, ob Admin-Rechte vorhanden sind
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Starte Skript mit Admin-Rechten ...
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
:: IP-Adresse eingeben
|
||||
set /p PRINTER_IP="Gib die IP-Adresse des Druckers ein: "
|
||||
|
||||
:: Druckernamen eingeben
|
||||
set /p PRINTER_NAME="Gib den Namen des Druckers ein: "
|
||||
|
||||
:: Standarddrucker-Liste setzen
|
||||
set PRINTER_LIST="%PRINTER_NAME%"
|
||||
|
||||
:default_path
|
||||
:: Nutzt automatisch den Pfad der Batch-Datei
|
||||
set BASE_PATH=%~dp0
|
||||
set DRIVER_PATH=%BASE_PATH%hp-treiber
|
||||
set DELETE_DRIVER_PATH=1
|
||||
echo Verwende automatisch den Treiberordner: %DRIVER_PATH%
|
||||
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Treiber nicht gefunden! Lade ihn herunter...
|
||||
|
||||
:: Treiber von HP herunterladen
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/scl/fi/6ramq1o0lidso43pumi49/HP-Treiber.zip?rlkey=kizmngce43vrojylkwxe8eoof&st=7bcjoj4j&dl=1', '%BASE_PATH%hp-treiber.zip')"
|
||||
|
||||
:: Pruefen, ob der Download erfolgreich war
|
||||
if not exist "%BASE_PATH%hp-treiber.zip" (
|
||||
echo Fehler: Der Treiber konnte nicht heruntergeladen werden!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entpacke den Treiber...
|
||||
powershell -Command "Expand-Archive -Path '%BASE_PATH%hp-treiber.zip' -DestinationPath '%BASE_PATH%hp-treiber' -Force"
|
||||
|
||||
:: Pruefen, ob das Entpacken erfolgreich war
|
||||
if not exist "%BASE_PATH%hp-treiber" (
|
||||
echo Fehler: Das Entpacken ist fehlgeschlagen!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entferne die ZIP-Datei...
|
||||
del "%BASE_PATH%hp-treiber.zip"
|
||||
|
||||
echo Treiber wurde erfolgreich heruntergeladen und entpackt.
|
||||
)
|
||||
|
||||
GOTO check_path
|
||||
|
||||
:check_path
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Fehler: Der Treiberordner "%DRIVER_PATH%" existiert nicht!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Port erstellen
|
||||
echo Erstelle TCP/IP-Port...
|
||||
cscript "%WINDIR%\System32\Printing_Admin_Scripts\de-DE\prnport.vbs" -a -r %PRINTER_IP% -h %PRINTER_IP% -o raw
|
||||
|
||||
|
||||
:: Druckertreiber installieren (automatische INF-Suche)
|
||||
echo Installiere Druckertreiber aus: %DRIVER_PATH% ...
|
||||
pnputil /add-driver "%DRIVER_PATH%\hpbuio200le.inf" /install
|
||||
|
||||
:: Drucker installieren (inklusive der zusaetzlichen Drucker)
|
||||
for %%P in (%PRINTER_LIST%) do (
|
||||
echo Installiere Drucker: %%P ...
|
||||
rundll32 printui.dll,PrintUIEntry /if /b %%P /r "%PRINTER_IP%" /m "HP Universal Printing PCL 6"
|
||||
)
|
||||
|
||||
:: Nach Installation den Registry-Wert für SW-Drucker setzen
|
||||
echo Setze Standarddrucker-Einstellungen nach OH5 Standard...
|
||||
powershell -ExecutionPolicy Bypass -File "%BASE_PATH%do_default_printersettings_mono.ps1" -PrinterName "%PRINTER_NAME%"
|
||||
|
||||
|
||||
:: Standarddrucker setzen
|
||||
set /p SET_DEFAULT="Soll '%PRINTER_NAME%' als Standard gesetzt werden? (J/N): "
|
||||
IF /I "%SET_DEFAULT%"=="J" GOTO set_default
|
||||
GOTO cleanup
|
||||
|
||||
:set_default
|
||||
rundll32 printui.dll,PrintUIEntry /y /n "%PRINTER_NAME%"
|
||||
echo "%PRINTER_NAME%" ist jetzt der Standarddrucker.
|
||||
|
||||
:cleanup
|
||||
:: Treiberordner loeschen, nur wenn der Benutzer "N" gewaehlt hat
|
||||
if "%DELETE_DRIVER_PATH%"=="1" (
|
||||
if exist "%DRIVER_PATH%" (
|
||||
echo Entferne den heruntergeladenen Treiberordner...
|
||||
rmdir /s /q "%DRIVER_PATH%"
|
||||
echo Treiberordner erfolgreich geloescht.
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
echo Installation abgeschlossen.
|
||||
pause
|
||||
27
Assets/HP/do_default_printersettings.ps1
Normal file
27
Assets/HP/do_default_printersettings.ps1
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
param (
|
||||
[string]$PrinterName
|
||||
)
|
||||
|
||||
try {
|
||||
# Druckername fuer Schwarz-Weiß und Farbe generieren
|
||||
$PrinterNameSW = "$PrinterName (SW)"
|
||||
$PrinterNameColor = "$PrinterName (Farbe)"
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameSW ..."
|
||||
|
||||
# Setze den Druckmodus fuer Schwarz-Weiß auf Monochrome
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -Color $false
|
||||
|
||||
# Duplex fuer Schwarz-Weiß deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -DuplexingMode OneSided
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameColor ..."
|
||||
|
||||
# Duplex fuer Farbe deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameColor -DuplexingMode OneSided
|
||||
|
||||
Write-Host "Fertig! Alle Einstellungen wurden erfolgreich gesetzt."
|
||||
}
|
||||
catch {
|
||||
Write-Host "Fehler: Konnte die Druckereinstellung nicht ändern. ueberpruefe, ob die Drucker '$PrinterNameSW' und '$PrinterNameColor' existieren!"
|
||||
}
|
||||
18
Assets/HP/do_default_printersettings_mono.ps1
Normal file
18
Assets/HP/do_default_printersettings_mono.ps1
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
param (
|
||||
[string]$PrinterName
|
||||
)
|
||||
|
||||
try {
|
||||
# Druckername fuer Schwarz-Weiß und Farbe generieren
|
||||
$PrinterNameSW = "$PrinterName"
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameSW ..."
|
||||
|
||||
# Duplex fuer Schwarz-Weiß deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -DuplexingMode OneSided
|
||||
|
||||
Write-Host "Fertig! Alle Einstellungen wurden erfolgreich gesetzt."
|
||||
}
|
||||
catch {
|
||||
Write-Host "Fehler: Konnte die Druckereinstellung nicht ändern. ueberpruefe, ob die Drucker '$PrinterNameSW' existieren!"
|
||||
}
|
||||
26
Assets/HP/old/do_default_printersettings regedit.ps1
Normal file
26
Assets/HP/old/do_default_printersettings regedit.ps1
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
param (
|
||||
[string]$PrinterName
|
||||
)
|
||||
|
||||
# Registry-Pfad zusammenbauen
|
||||
$regPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Print\Printers\$PrinterName\DsDriver"
|
||||
|
||||
# Prüfe, ob der Registry-Pfad existiert
|
||||
if (Test-Path $regPath) {
|
||||
#Write-Host "Registry-Pfad gefunden: $regPath"
|
||||
|
||||
# Prüfe, ob printCollate existiert
|
||||
$valueExists = Get-ItemProperty -Path $regPath -Name printCollate -ErrorAction SilentlyContinue
|
||||
|
||||
if ($valueExists) {
|
||||
Write-Host "Loesche alten Wert von Farbruck..."
|
||||
Remove-ItemProperty -Path $regPath -Name printCollate -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Setze printCollate auf 00 (Schwarz-Weiß)
|
||||
Write-Host "Setze Graustufendruck auf ein..."
|
||||
New-ItemProperty -Path $regPath -Name printCollate -PropertyType Binary -Value ([byte[]](0x00)) -Force
|
||||
Write-Host "Fertig!"
|
||||
} else {
|
||||
Write-Host "Fehler: Registry-Pfad nicht gefunden! Stelle sicher, dass der Drucker installiert ist."
|
||||
}
|
||||
26
Assets/HP/old/get_latest_hp_driver.ps1
Normal file
26
Assets/HP/old/get_latest_hp_driver.ps1
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# HP FTP URL
|
||||
$ftpUrl = "ftp://ftp.hp.com/pub/softlib/software13/printers/UPD/"
|
||||
|
||||
# Erstelle die FTP-Anfrage
|
||||
$ftpRequest = [System.Net.WebRequest]::Create($ftpUrl)
|
||||
$ftpRequest.Method = [System.Net.WebRequestMethods+Ftp]::ListDirectory
|
||||
|
||||
try {
|
||||
# Antwort holen
|
||||
$response = $ftpRequest.GetResponse()
|
||||
$stream = $response.GetResponseStream()
|
||||
$reader = New-Object System.IO.StreamReader($stream)
|
||||
|
||||
Write-Host "🔍 Durchsuche FTP-Ordner: $ftpUrl"
|
||||
|
||||
# Dateien auflisten
|
||||
while ($line = $reader.ReadLine()) {
|
||||
Write-Host "📄 Gefunden: $line"
|
||||
}
|
||||
|
||||
# Ressourcen freigeben
|
||||
$reader.Close()
|
||||
$response.Close()
|
||||
} catch {
|
||||
Write-Host "❌ Fehler: Zugriff auf den FTP-Server nicht möglich!"
|
||||
}
|
||||
125
Assets/SHARP/Simple Sharp SW Farbe.bat
Normal file
125
Assets/SHARP/Simple Sharp SW Farbe.bat
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
@echo off
|
||||
:: Prüfe, ob Admin-Rechte vorhanden sind
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Starte Skript mit Admin-Rechten ...
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
:: Maschine auswählen
|
||||
echo Waehle die Maschinenart:
|
||||
echo [1] BP Maschine
|
||||
echo [2] MX Maschine
|
||||
set /p MACHINE_TYPE="Waehle die Maschinenart (1 oder 2): "
|
||||
|
||||
:: Passenden Treiber-Link setzen
|
||||
if "%MACHINE_TYPE%"=="1" (
|
||||
set DRIVER_URL="https://www.dropbox.com/scl/fi/36dumrg063qu5tauyctnu/SharpBP-Treiber.zip?rlkey=9osqutqtqegs7ug271p4y9xov&st=uo01gbdx&dl=1"
|
||||
set MACHINE_NAME="BP Maschine"
|
||||
) else if "%MACHINE_TYPE%"=="2" (
|
||||
set DRIVER_URL="https://www.dropbox.com/scl/fi/auhqd2mpiutej1nu4acqr/SharpMX-Treiber.zip?rlkey=mplmbchth7i9317xndoehlvj4&st=27rk3l5k&dl=1"
|
||||
set MACHINE_NAME="MX Maschine"
|
||||
) else (
|
||||
echo Ungueltige Eingabe! Starte das Skript erneut und waehle 1 oder 2.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: IP-Adresse eingeben
|
||||
set /p PRINTER_IP="Gib die IP-Adresse des Druckers ein: "
|
||||
|
||||
:: Druckernamen eingeben
|
||||
set /p PRINTER_NAME="Gib den Namen des Druckers ein (ohne SW/Farbe): "
|
||||
|
||||
:: Standarddrucker-Liste setzen (SW und Farbe)
|
||||
set PRINTER_LIST="%PRINTER_NAME% (SW)" "%PRINTER_NAME% (Farbe)"
|
||||
|
||||
:default_path
|
||||
:: Nutzt automatisch den Pfad der Batch-Datei
|
||||
set BASE_PATH=%~dp0
|
||||
set DRIVER_PATH=%BASE_PATH%sharp-treiber
|
||||
set DELETE_DRIVER_PATH=1
|
||||
echo Verwende automatisch den Treiberordner: %DRIVER_PATH%
|
||||
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Treiber nicht gefunden! Lade ihn herunter...
|
||||
|
||||
:: Treiber von HP herunterladen
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile(\"%DRIVER_URL%\", '%BASE_PATH%sharp-treiber.zip')"
|
||||
|
||||
:: Pruefen, ob der Download erfolgreich war
|
||||
if not exist "%BASE_PATH%sharp-treiber.zip" (
|
||||
echo Fehler: Der Treiber konnte nicht heruntergeladen werden!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entpacke den Treiber...
|
||||
powershell -Command "Expand-Archive -Path '%BASE_PATH%sharp-treiber.zip' -DestinationPath '%BASE_PATH%sharp-treiber' -Force"
|
||||
|
||||
:: Pruefen, ob das Entpacken erfolgreich war
|
||||
if not exist "%BASE_PATH%sharp-treiber" (
|
||||
echo Fehler: Das Entpacken ist fehlgeschlagen!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entferne die ZIP-Datei...
|
||||
del "%BASE_PATH%sharp-treiber.zip"
|
||||
|
||||
echo Treiber wurde erfolgreich heruntergeladen und entpackt.
|
||||
)
|
||||
|
||||
GOTO check_path
|
||||
|
||||
:check_path
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Fehler: Der Treiberordner "%DRIVER_PATH%" existiert nicht!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Port erstellen
|
||||
echo Erstelle TCP/IP-Port...
|
||||
cscript "%WINDIR%\System32\Printing_Admin_Scripts\de-DE\prnport.vbs" -a -r %PRINTER_IP% -h %PRINTER_IP% -o raw
|
||||
|
||||
:: Druckertreiber installieren (automatische INF-Suche in PCL6\64bit)
|
||||
echo Installiere Druckertreiber aus: %DRIVER_PATH%\PCL6\64bit ...
|
||||
pnputil /add-driver "%DRIVER_PATH%\PCL6\64bit\*.inf" /install
|
||||
|
||||
:: Drucker installieren (inklusive der zusaetzlichen Drucker)
|
||||
for %%P in (%PRINTER_LIST%) do (
|
||||
echo Installiere Drucker: %%P ...
|
||||
rundll32 printui.dll,PrintUIEntry /if /b %%P /r "%PRINTER_IP%" /m "SHARP UD3 PCL6"
|
||||
)
|
||||
|
||||
:: Nach Installation den Registry-Wert für SW-Drucker setzen
|
||||
echo Setze Standarddrucker-Einstellungen nach OH5 Standard...
|
||||
powershell -ExecutionPolicy Bypass -File "%BASE_PATH%do_default_printersettings.ps1" -PrinterName "%PRINTER_NAME%"
|
||||
|
||||
|
||||
:: Standarddrucker setzen
|
||||
set /p SET_DEFAULT="Soll '%PRINTER_NAME% (SW)' als Standard gesetzt werden? (J/N): "
|
||||
IF /I "%SET_DEFAULT%"=="J" GOTO set_default
|
||||
GOTO cleanup
|
||||
|
||||
:set_default
|
||||
rundll32 printui.dll,PrintUIEntry /y /n "%PRINTER_NAME% (SW)"
|
||||
echo "%PRINTER_NAME% (SW)" ist jetzt der Standarddrucker.
|
||||
|
||||
:cleanup
|
||||
:: Treiberordner loeschen, nur wenn der Benutzer "N" gewaehlt hat
|
||||
if "%DELETE_DRIVER_PATH%"=="1" (
|
||||
if exist "%DRIVER_PATH%" (
|
||||
echo Entferne den heruntergeladenen Treiberordner...
|
||||
rmdir /s /q "%DRIVER_PATH%"
|
||||
echo Treiberordner erfolgreich geloescht.
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
echo Installation abgeschlossen.
|
||||
pause
|
||||
126
Assets/SHARP/Simple Sharp SW.bat
Normal file
126
Assets/SHARP/Simple Sharp SW.bat
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
@echo off
|
||||
:: Prüfe, ob Admin-Rechte vorhanden sind
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Starte Skript mit Admin-Rechten ...
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
:: Maschine auswählen
|
||||
echo Waehle die Maschinenart:
|
||||
echo [1] BP Maschine
|
||||
echo [2] MX Maschine
|
||||
set /p MACHINE_TYPE="Waehle die Maschinenart (1 oder 2): "
|
||||
|
||||
:: Passenden Treiber-Link setzen
|
||||
if "%MACHINE_TYPE%"=="1" (
|
||||
set DRIVER_URL="https://www.dropbox.com/scl/fi/36dumrg063qu5tauyctnu/SharpBP-Treiber.zip?rlkey=9osqutqtqegs7ug271p4y9xov&st=uo01gbdx&dl=1"
|
||||
set MACHINE_NAME="BP Maschine"
|
||||
) else if "%MACHINE_TYPE%"=="2" (
|
||||
set DRIVER_URL="https://www.dropbox.com/scl/fi/auhqd2mpiutej1nu4acqr/SharpMX-Treiber.zip?rlkey=mplmbchth7i9317xndoehlvj4&st=27rk3l5k&dl=1"
|
||||
set MACHINE_NAME="MX Maschine"
|
||||
) else (
|
||||
echo Ungueltige Eingabe! Starte das Skript erneut und waehle 1 oder 2.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: IP-Adresse eingeben
|
||||
set /p PRINTER_IP="Gib die IP-Adresse des Druckers ein: "
|
||||
|
||||
:: Druckernamen eingeben
|
||||
set /p PRINTER_NAME="Gib den Namen des Druckers ein:"
|
||||
|
||||
:: Standarddrucker-Liste setzen (SW und Farbe)
|
||||
set PRINTER_LIST="%PRINTER_NAME%"
|
||||
|
||||
:default_path
|
||||
:: Nutzt automatisch den Pfad der Batch-Datei
|
||||
set BASE_PATH=%~dp0
|
||||
set DRIVER_PATH=%BASE_PATH%sharp-treiber
|
||||
set DELETE_DRIVER_PATH=1
|
||||
echo Verwende automatisch den Treiberordner: %DRIVER_PATH%
|
||||
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Treiber nicht gefunden! Lade ihn herunter...
|
||||
|
||||
:: Treiber von HP herunterladen
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile(\"%DRIVER_URL%\", '%BASE_PATH%sharp-treiber.zip')"
|
||||
|
||||
:: Pruefen, ob der Download erfolgreich war
|
||||
if not exist "%BASE_PATH%sharp-treiber.zip" (
|
||||
echo Fehler: Der Treiber konnte nicht heruntergeladen werden!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entpacke den Treiber...
|
||||
powershell -Command "Expand-Archive -Path '%BASE_PATH%sharp-treiber.zip' -DestinationPath '%BASE_PATH%sharp-treiber' -Force"
|
||||
|
||||
:: Pruefen, ob das Entpacken erfolgreich war
|
||||
if not exist "%BASE_PATH%sharp-treiber" (
|
||||
echo Fehler: Das Entpacken ist fehlgeschlagen!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entferne die ZIP-Datei...
|
||||
del "%BASE_PATH%sharp-treiber.zip"
|
||||
|
||||
echo Treiber wurde erfolgreich heruntergeladen und entpackt.
|
||||
)
|
||||
|
||||
GOTO check_path
|
||||
|
||||
:check_path
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Fehler: Der Treiberordner "%DRIVER_PATH%" existiert nicht!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Port erstellen
|
||||
echo Erstelle TCP/IP-Port...
|
||||
cscript "%WINDIR%\System32\Printing_Admin_Scripts\de-DE\prnport.vbs" -a -r %PRINTER_IP% -h %PRINTER_IP% -o raw
|
||||
|
||||
|
||||
:: Druckertreiber installieren (automatische INF-Suche in PCL6\64bit)
|
||||
echo Installiere Druckertreiber aus: %DRIVER_PATH%\PCL6\64bit ...
|
||||
pnputil /add-driver "%DRIVER_PATH%\PCL6\64bit\*.inf" /install
|
||||
|
||||
:: Drucker installieren (inklusive der zusaetzlichen Drucker)
|
||||
for %%P in (%PRINTER_LIST%) do (
|
||||
echo Installiere Drucker: %%P ...
|
||||
rundll32 printui.dll,PrintUIEntry /if /b %%P /r "%PRINTER_IP%" /m "SHARP UD3 PCL6"
|
||||
)
|
||||
|
||||
:: Nach Installation den Registry-Wert für SW-Drucker setzen
|
||||
echo Setze Standarddrucker-Einstellungen nach OH5 Standard...
|
||||
powershell -ExecutionPolicy Bypass -File "%BASE_PATH%do_default_printersettings_mono.ps1" -PrinterName "%PRINTER_NAME%"
|
||||
|
||||
|
||||
:: Standarddrucker setzen
|
||||
set /p SET_DEFAULT="Soll '%PRINTER_NAME%' als Standard gesetzt werden? (J/N): "
|
||||
IF /I "%SET_DEFAULT%"=="J" GOTO set_default
|
||||
GOTO cleanup
|
||||
|
||||
:set_default
|
||||
rundll32 printui.dll,PrintUIEntry /y /n "%PRINTER_NAME%"
|
||||
echo "%PRINTER_NAME%" ist jetzt der Standarddrucker.
|
||||
|
||||
:cleanup
|
||||
:: Treiberordner loeschen, nur wenn der Benutzer "N" gewaehlt hat
|
||||
if "%DELETE_DRIVER_PATH%"=="1" (
|
||||
if exist "%DRIVER_PATH%" (
|
||||
echo Entferne den heruntergeladenen Treiberordner...
|
||||
rmdir /s /q "%DRIVER_PATH%"
|
||||
echo Treiberordner erfolgreich geloescht.
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
echo Installation abgeschlossen.
|
||||
pause
|
||||
27
Assets/SHARP/do_default_printersettings.ps1
Normal file
27
Assets/SHARP/do_default_printersettings.ps1
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
param (
|
||||
[string]$PrinterName
|
||||
)
|
||||
|
||||
try {
|
||||
# Druckername fuer Schwarz-Weiß und Farbe generieren
|
||||
$PrinterNameSW = "$PrinterName (SW)"
|
||||
$PrinterNameColor = "$PrinterName (Farbe)"
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameSW ..."
|
||||
|
||||
# Setze den Druckmodus fuer Schwarz-Weiß auf Monochrome
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -Color $false
|
||||
|
||||
# Duplex fuer Schwarz-Weiß deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -DuplexingMode OneSided
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameColor ..."
|
||||
|
||||
# Duplex fuer Farbe deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameColor -DuplexingMode OneSided
|
||||
|
||||
Write-Host "Fertig! Alle Einstellungen wurden erfolgreich gesetzt."
|
||||
}
|
||||
catch {
|
||||
Write-Host "Fehler: Konnte die Druckereinstellung nicht ändern. ueberpruefe, ob die Drucker '$PrinterNameSW' und '$PrinterNameColor' existieren!"
|
||||
}
|
||||
19
Assets/SHARP/do_default_printersettings_mono.ps1
Normal file
19
Assets/SHARP/do_default_printersettings_mono.ps1
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
param (
|
||||
[string]$PrinterName
|
||||
)
|
||||
|
||||
try {
|
||||
# Druckername fuer Schwarz-Weiß und Farbe generieren
|
||||
$PrinterNameSW = "$PrinterName"
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameSW ..."
|
||||
|
||||
|
||||
# Duplex fuer Schwarz-Weiß deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -DuplexingMode OneSided
|
||||
|
||||
Write-Host "Fertig! Alle Einstellungen wurden erfolgreich gesetzt."
|
||||
}
|
||||
catch {
|
||||
Write-Host "Fehler: Konnte die Druckereinstellung nicht ändern. ueberpruefe, ob die Drucker '$PrinterNameSW' und '$PrinterNameColor' existieren!"
|
||||
}
|
||||
3
Assets/UTAX/SWConfig.xml
Normal file
3
Assets/UTAX/SWConfig.xml
Normal file
File diff suppressed because one or more lines are too long
116
Assets/UTAX/Simple Utax SW Farbe.bat
Normal file
116
Assets/UTAX/Simple Utax SW Farbe.bat
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
@echo off
|
||||
:: Prüfe, ob Admin-Rechte vorhanden sind
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Starte Skript mit Admin-Rechten ...
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
:: Druckermodell eingeben
|
||||
set /p PRINTER_MODEL="Bitte gib genau an, um welchen Drucker es sich handelt(z.b. P-5034I oder 2508ci): "
|
||||
|
||||
:: Druckertreiber mit Modell + KX setzen
|
||||
set DRIVER_NAME="%PRINTER_MODEL% KX"
|
||||
|
||||
:: IP-Adresse eingeben
|
||||
set /p PRINTER_IP="Gib die IP-Adresse des Druckers ein: "
|
||||
|
||||
:: Druckernamen eingeben
|
||||
set /p PRINTER_NAME="Gib den Namen des Druckers ein (ohne SW/Farbe): "
|
||||
|
||||
:: Standarddrucker-Liste setzen (SW und Farbe)
|
||||
set PRINTER_LIST="%PRINTER_NAME% (SW)" "%PRINTER_NAME% (Farbe)"
|
||||
|
||||
|
||||
:default_path
|
||||
:: Nutzt automatisch den Pfad der Batch-Datei
|
||||
set BASE_PATH=%~dp0
|
||||
set DRIVER_PATH=%BASE_PATH%Utax-treiber
|
||||
set DELETE_DRIVER_PATH=1
|
||||
echo Verwende automatisch den Treiberordner: %DRIVER_PATH%
|
||||
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Treiber nicht gefunden! Lade ihn herunter...
|
||||
|
||||
:: Treiber von Utax herunterladen
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/scl/fi/smk1cpkz0ic0qidxirtvc/Utax-Treiber.zip?rlkey=eb3ly2i0menvoxbypdhtb7ozl&st=biozozb8&dl=1', '%BASE_PATH%Utax-treiber.zip')"
|
||||
|
||||
:: Pruefen, ob der Download erfolgreich war
|
||||
if not exist "%BASE_PATH%Utax-treiber.zip" (
|
||||
echo Fehler: Der Treiber konnte nicht heruntergeladen werden!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entpacke den Treiber...
|
||||
powershell -Command "Expand-Archive -Path '%BASE_PATH%Utax-treiber.zip' -DestinationPath '%BASE_PATH%Utax-treiber' -Force"
|
||||
|
||||
:: Pruefen, ob das Entpacken erfolgreich war
|
||||
if not exist "%BASE_PATH%Utax-treiber" (
|
||||
echo Fehler: Das Entpacken ist fehlgeschlagen!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Entferne die ZIP-Datei...
|
||||
del "%BASE_PATH%Utax-treiber.zip"
|
||||
|
||||
echo Treiber wurde erfolgreich heruntergeladen und entpackt.
|
||||
)
|
||||
|
||||
GOTO check_path
|
||||
|
||||
:check_path
|
||||
:: Pruefe, ob der Treiberordner existiert
|
||||
if not exist "%DRIVER_PATH%" (
|
||||
echo Fehler: Der Treiberordner "%DRIVER_PATH%" existiert nicht!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Port erstellen
|
||||
echo Erstelle TCP/IP-Port...
|
||||
cscript "%WINDIR%\System32\Printing_Admin_Scripts\de-DE\prnport.vbs" -a -r %PRINTER_IP% -h %PRINTER_IP% -o raw
|
||||
|
||||
|
||||
:: Druckertreiber installieren (automatische INF-Suche)
|
||||
echo Installiere Druckertreiber aus: %DRIVER_PATH% ...
|
||||
pnputil /add-driver "%DRIVER_PATH%\Kx85_UPD_TA_8.5.2405_RC2_WHQL\64bit\*.inf" /install
|
||||
|
||||
:: Drucker installieren (inklusive der zusaetzlichen Drucker)
|
||||
for %%P in (%PRINTER_LIST%) do (
|
||||
echo Installiere Drucker: %%P ...
|
||||
rundll32 printui.dll,PrintUIEntry /if /b %%P /r "%PRINTER_IP%" /m %DRIVER_NAME%
|
||||
)
|
||||
|
||||
:: Nach Installation den Registry-Wert für SW-Drucker setzen
|
||||
echo Setze Standarddrucker-Einstellungen nach OH5 Standard...
|
||||
powershell -ExecutionPolicy Bypass -File "%BASE_PATH%do_default_printersettings.ps1" -PrinterName "%PRINTER_NAME%"
|
||||
|
||||
|
||||
:: Standarddrucker setzen
|
||||
set /p SET_DEFAULT="Soll '%PRINTER_NAME% (SW)' als Standard gesetzt werden? (J/N): "
|
||||
IF /I "%SET_DEFAULT%"=="J" GOTO set_default
|
||||
GOTO cleanup
|
||||
|
||||
:set_default
|
||||
rundll32 printui.dll,PrintUIEntry /y /n "%PRINTER_NAME% (SW)"
|
||||
rundll32 printui.dll,PrintUIEntry /Xs /n "%PRINTER_NAME% (SW)" attributes +Direct
|
||||
|
||||
echo "%PRINTER_NAME% (SW)" ist jetzt der Standarddrucker.
|
||||
|
||||
:cleanup
|
||||
:: Treiberordner loeschen, nur wenn der Benutzer "N" gewaehlt hat
|
||||
if "%DELETE_DRIVER_PATH%"=="1" (
|
||||
if exist "%DRIVER_PATH%" (
|
||||
echo Entferne den heruntergeladenen Treiberordner...
|
||||
rmdir /s /q "%DRIVER_PATH%"
|
||||
echo Treiberordner erfolgreich geloescht.
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
echo Installation abgeschlossen.
|
||||
pause
|
||||
38
Assets/UTAX/do_default_printersettings.ps1
Normal file
38
Assets/UTAX/do_default_printersettings.ps1
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
param (
|
||||
[string]$PrinterName
|
||||
)
|
||||
|
||||
try {
|
||||
# Druckername fuer Schwarz-Weiß und Farbe generieren
|
||||
$PrinterNameSW = "$PrinterName (SW)"
|
||||
$PrinterNameColor = "$PrinterName (Farbe)"
|
||||
|
||||
# Aktuellen Skript-Ordner ermitteln
|
||||
#$ScriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||
#$ConfigFile = "$ScriptPath\SwConfig.xml"
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameSW ..."
|
||||
|
||||
# Setze den Druckmodus fuer Schwarz-Weiß auf Monochrome
|
||||
# Set-PrintConfiguration -PrinterName $PrinterNameSW -Color $false
|
||||
# Set-PrinterProperty -PrinterName $PrinterNameSW -PropertyName "PrintColorMode" -Value "Monochrome"
|
||||
# Set-PrintConfiguration -PrinterName $PrinterName -PrintTicketXML (Get-Content $ConfigFile -Raw)
|
||||
|
||||
|
||||
|
||||
# Duplex fuer Schwarz-Weiß deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -DuplexingMode OneSided
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameSW -Color Monochrome
|
||||
|
||||
|
||||
|
||||
Write-Host "Setze Standard-Druckeinstellungen fuer: $PrinterNameColor ..."
|
||||
|
||||
# Duplex fuer Farbe deaktivieren
|
||||
Set-PrintConfiguration -PrinterName $PrinterNameColor -DuplexingMode OneSided
|
||||
|
||||
Write-Host "Fertig! Alle Einstellungen wurden erfolgreich gesetzt."
|
||||
}
|
||||
catch {
|
||||
Write-Host "Fehler: Konnte die Druckereinstellung nicht ändern. ueberpruefe, ob die Drucker '$PrinterNameSW' und '$PrinterNameColor' existieren!"
|
||||
}
|
||||
78
Assets/UTAX/test.ps1
Normal file
78
Assets/UTAX/test.ps1
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
Add-Type -Language CSharp -TypeDefinition @"
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class PrinterConfig {
|
||||
[DllImport("winspool.drv", SetLastError = true)]
|
||||
public static extern bool OpenPrinter(string pPrinterName, out IntPtr hPrinter, IntPtr pDefault);
|
||||
|
||||
[DllImport("winspool.drv", SetLastError = true)]
|
||||
public static extern bool ClosePrinter(IntPtr hPrinter);
|
||||
|
||||
[DllImport("winspool.drv", SetLastError = true)]
|
||||
public static extern int DocumentProperties(IntPtr hwnd, IntPtr hPrinter, string pDeviceName,
|
||||
IntPtr pDevModeOutput, IntPtr pDevModeInput, int fMode);
|
||||
|
||||
public const int DM_COLOR = 0x800;
|
||||
public const short DMCOLOR_MONOCHROME = 1;
|
||||
public const short DMCOLOR_COLOR = 2;
|
||||
|
||||
public const int DM_IN_BUFFER = 0x8;
|
||||
public const int DM_OUT_BUFFER = 0x2;
|
||||
|
||||
public static void SetPrinterToMonochrome(string printerName) {
|
||||
IntPtr hPrinter;
|
||||
if (!OpenPrinter(printerName, out hPrinter, IntPtr.Zero)) {
|
||||
throw new Exception("Drucker konnte nicht geöffnet werden.");
|
||||
}
|
||||
|
||||
// Erste Abfrage: Wie groß ist der DEVMODE?
|
||||
int sizeNeeded = DocumentProperties(IntPtr.Zero, hPrinter, printerName, IntPtr.Zero, IntPtr.Zero, 0);
|
||||
if (sizeNeeded <= 0) {
|
||||
ClosePrinter(hPrinter);
|
||||
throw new Exception("Konnte DEVMODE-Größe nicht ermitteln.");
|
||||
}
|
||||
|
||||
// Speicher allokieren für Input & Output DEVMODE
|
||||
IntPtr pDevModeInput = Marshal.AllocHGlobal(sizeNeeded);
|
||||
IntPtr pDevModeOutput = Marshal.AllocHGlobal(sizeNeeded);
|
||||
|
||||
// DEVMODE vom Drucker holen
|
||||
int getDevModeResult = DocumentProperties(IntPtr.Zero, hPrinter, printerName, pDevModeInput, IntPtr.Zero, 0);
|
||||
if (getDevModeResult < 0) {
|
||||
ClosePrinter(hPrinter);
|
||||
Marshal.FreeHGlobal(pDevModeInput);
|
||||
Marshal.FreeHGlobal(pDevModeOutput);
|
||||
throw new Exception("Konnte DEVMODE nicht vom Drucker abrufen.");
|
||||
}
|
||||
|
||||
// Lesen und bearbeiten
|
||||
int offset = 104; // typischer Offset von dmColor innerhalb DEVMODE (abhängig vom Treiber!)
|
||||
byte[] devmodeData = new byte[sizeNeeded];
|
||||
Marshal.Copy(pDevModeInput, devmodeData, 0, sizeNeeded);
|
||||
|
||||
// Setze das dmColor-Feld auf MONOCHROME (1)
|
||||
devmodeData[offset + 0] = (byte)(DMCOLOR_MONOCHROME & 0xFF); // Low Byte
|
||||
devmodeData[offset + 1] = (byte)((DMCOLOR_MONOCHROME >> 8) & 0xFF); // High Byte
|
||||
|
||||
// Setze dmFields (aktiviert die Einstellung) — Bit 11 (0x800)
|
||||
devmodeData[76] |= 0x00; // low byte bleibt gleich
|
||||
devmodeData[77] |= 0x08; // high byte |= 0x08 → 0x800 aktiviert DM_COLOR
|
||||
|
||||
Marshal.Copy(devmodeData, 0, pDevModeInput, sizeNeeded);
|
||||
|
||||
// Setzen des neuen DEVMODEs
|
||||
int setResult = DocumentProperties(IntPtr.Zero, hPrinter, printerName, pDevModeOutput, pDevModeInput, DM_IN_BUFFER | DM_OUT_BUFFER);
|
||||
if (setResult < 0) {
|
||||
throw new Exception("Setzen des bearbeiteten DEVMODE fehlgeschlagen.");
|
||||
}
|
||||
|
||||
ClosePrinter(hPrinter);
|
||||
Marshal.FreeHGlobal(pDevModeInput);
|
||||
Marshal.FreeHGlobal(pDevModeOutput);
|
||||
}
|
||||
}
|
||||
"@
|
||||
|
||||
# 🎯 Name deines Druckers
|
||||
[PrinterConfig]::SetPrinterToMonochrome("2508ci KX")
|
||||
12
Assets/zTool/disable_script.bat
Normal file
12
Assets/zTool/disable_script.bat
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
@echo off
|
||||
:: Prüfe, ob Admin-Rechte vorhanden sind
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Starte Skript mit Admin-Rechten ...
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
echo Sperre Script-Execution
|
||||
powershell -Command "Set-ExecutionPolicy Restricted -Scope LocalMachine"
|
||||
echo Kehre ins das Hauptmenue zurueck
|
||||
12
Assets/zTool/enable_script.bat
Normal file
12
Assets/zTool/enable_script.bat
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
@echo off
|
||||
:: Prüfe, ob Admin-Rechte vorhanden sind
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Starte Skript mit Admin-Rechten ...
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
echo Erlaube Script-Execution
|
||||
powershell -Command "Set-ExecutionPolicy RemoteSigned -Scope LocalMachine"
|
||||
echo Kehre ins das Hauptmenue zurueck
|
||||
244
OH5_Drucker_Installer.bat
Normal file
244
OH5_Drucker_Installer.bat
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
@echo off
|
||||
title OH5 Drucker Installer
|
||||
chcp 65001 >nul
|
||||
cls
|
||||
|
||||
:main
|
||||
cls
|
||||
echo ╔════════════════════════════════════════════════════════════╗
|
||||
echo ║ [34mOH[31m5[0m Drucker Installer ║
|
||||
echo ╠════════════════════════════════════════════════════════════╣
|
||||
echo ║ Bitte waehle deine Druckermarke: ║
|
||||
echo ║ ║
|
||||
echo ║ 1. HP ║
|
||||
echo ║ 2. Sharp ║
|
||||
echo ║ 3. Utax (Work in Progress) ║
|
||||
echo ║ 4. Epson ║
|
||||
echo ║ 5. Brother ║
|
||||
echo ║ ║
|
||||
echo ║ 6. Beenden ║
|
||||
echo ╠════════════════════════════════════╦═══════════════════════╝
|
||||
echo ║ Erweitert: ║
|
||||
echo ╠════════════════════════════════════╣
|
||||
echo ║ 7. Enable Script-Execution ║
|
||||
echo ║ 8. Disable Script-Execution ║
|
||||
echo ╚════════════════════════════════════╝
|
||||
echo.
|
||||
|
||||
choice /C 12345678 /N /M "Bitte eine Option waehlen: "
|
||||
|
||||
if errorlevel 8 goto disablescript
|
||||
if errorlevel 7 goto enablescript
|
||||
if errorlevel 6 goto exit
|
||||
if errorlevel 5 goto brother
|
||||
if errorlevel 4 goto epson
|
||||
if errorlevel 3 goto utax
|
||||
if errorlevel 2 goto sharp
|
||||
if errorlevel 1 goto hp
|
||||
|
||||
:enablescript
|
||||
cls
|
||||
echo Starte Script-Tool...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\zTool"
|
||||
start "" "enable_script.bat"
|
||||
goto main
|
||||
|
||||
:disablescript
|
||||
cls
|
||||
echo Starte Script-Tool...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\zTool"
|
||||
start "" "disable_script.bat"
|
||||
goto main
|
||||
|
||||
|
||||
:wip
|
||||
cls
|
||||
echo ===============================================
|
||||
echo Diese Option ist noch in Arbeit.
|
||||
echo Bitte versuche es spaeter erneut.
|
||||
echo ===============================================
|
||||
echo.
|
||||
pause
|
||||
goto main
|
||||
|
||||
:hp
|
||||
cls
|
||||
echo ===============================================
|
||||
echo HP Drucker Installation
|
||||
echo ===============================================
|
||||
echo.
|
||||
echo Bitte waehle die Installationsart:
|
||||
echo.
|
||||
echo 1. Einfache Installation (Color)
|
||||
echo 2. Einfache Installation (Mono)
|
||||
echo 3. Zurueck zum Hauptmenue
|
||||
echo.
|
||||
|
||||
choice /C 123 /N /M "Bitte eine Option waehlen: "
|
||||
|
||||
if errorlevel 3 goto main
|
||||
if errorlevel 2 goto hp_mono
|
||||
if errorlevel 1 goto hp_simple
|
||||
|
||||
:hp_simple
|
||||
cls
|
||||
echo Starte Standard HP-Installation...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\HP"
|
||||
start "" "Simple HP SW Farbe.bat"
|
||||
goto exit
|
||||
|
||||
:hp_mono
|
||||
cls
|
||||
echo Starte Mono HP-Installation...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\HP"
|
||||
start "" "Simple HP SW.bat"
|
||||
goto exit
|
||||
|
||||
:hp_advanced
|
||||
cls
|
||||
echo Starte erweiterte HP-Installation...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\HP"
|
||||
start "" "Advanced HP SW&Farbe.bat"
|
||||
goto exit
|
||||
|
||||
|
||||
:sharp
|
||||
cls
|
||||
echo ===============================================
|
||||
echo Sharp Drucker Installation
|
||||
echo ===============================================
|
||||
echo.
|
||||
echo Bitte waehle die Installationsart:
|
||||
echo.
|
||||
echo 1. Einfache Installation (Color)
|
||||
echo 2. Einfache Installation (Mono)
|
||||
echo 3. Zurueck zum Hauptmenue
|
||||
echo.
|
||||
|
||||
choice /C 123 /N /M "Bitte eine Option waehlen: "
|
||||
|
||||
if errorlevel 3 goto main
|
||||
if errorlevel 2 goto sharp_mono
|
||||
if errorlevel 1 goto sharp_simple
|
||||
|
||||
:sharp_simple
|
||||
cls
|
||||
echo Starte einfache Sharp-Installation...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\SHARP"
|
||||
start "" "Simple Sharp SW Farbe.bat"
|
||||
goto exit
|
||||
|
||||
:sharp_mono
|
||||
cls
|
||||
echo Starte einfache Sharp-Installation...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\SHARP"
|
||||
start "" "Simple Sharp SW.bat"
|
||||
goto exit
|
||||
|
||||
:epson
|
||||
cls
|
||||
echo ===============================================
|
||||
echo Epson Drucker Installation
|
||||
echo ===============================================
|
||||
echo.
|
||||
echo Bitte waehle die Installationsart:
|
||||
echo.
|
||||
echo 1. Einfache Installation (Color)
|
||||
echo 2. Einfache Installation (Mono)
|
||||
echo 3. Zurueck zum Hauptmenue
|
||||
echo.
|
||||
|
||||
choice /C 123 /N /M "Bitte eine Option waehlen: "
|
||||
|
||||
if errorlevel 3 goto main
|
||||
if errorlevel 2 goto epson_mono
|
||||
if errorlevel 1 goto epson_simple
|
||||
|
||||
:epson_simple
|
||||
cls
|
||||
echo Starte einfache Epson-Installation...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\EPSON"
|
||||
start "" "Simple Epson SW Farbe.bat"
|
||||
goto exit
|
||||
|
||||
:epson_mono
|
||||
cls
|
||||
echo Starte einfache Epson-Installation...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\EPSON"
|
||||
start "" "Simple Epson SW.bat"
|
||||
goto exit
|
||||
|
||||
:utax
|
||||
cls
|
||||
echo ===============================================
|
||||
echo Utax Drucker Installation
|
||||
echo ===============================================
|
||||
echo.
|
||||
echo Bitte waehle die Installationsart:
|
||||
echo.
|
||||
echo 1. Einfache Installation (Color - Work in Progress)
|
||||
echo 2. Einfache Installation (Mono - Work in Progress)
|
||||
echo 3. Zurueck zum Hauptmenue
|
||||
echo.
|
||||
|
||||
choice /C 123 /N /M "Bitte eine Option waehlen: "
|
||||
|
||||
if errorlevel 3 goto main
|
||||
if errorlevel 2 goto wip
|
||||
if errorlevel 1 goto utax_simple
|
||||
|
||||
:utax_simple
|
||||
cls
|
||||
echo Starte einfache Utax-Installation...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\Utax"
|
||||
start "" "Simple Utax SW Farbe.bat"
|
||||
goto exit
|
||||
|
||||
|
||||
:brother
|
||||
cls
|
||||
echo ===============================================
|
||||
echo Brother Drucker Installation
|
||||
echo ===============================================
|
||||
echo.
|
||||
echo Bitte waehle die Installationsart:
|
||||
echo.
|
||||
echo 1. Einfache Installation (Color)
|
||||
echo 2. Einfache Installation (Mono)
|
||||
echo 3. Zurueck zum Hauptmenue
|
||||
echo.
|
||||
|
||||
choice /C 123 /N /M "Bitte eine Option waehlen: "
|
||||
|
||||
if errorlevel 3 goto main
|
||||
if errorlevel 2 goto brother_mono
|
||||
if errorlevel 1 goto brother_simple
|
||||
|
||||
:brother_simple
|
||||
cls
|
||||
echo Starte einfache Brother-Installation...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\Brother"
|
||||
start "" "Simple Brother SW Farbe.bat"
|
||||
goto exit
|
||||
|
||||
:brother_mono
|
||||
cls
|
||||
echo Starte einfache Brother-Installation...
|
||||
echo.
|
||||
cd /d "%~dp0\Assets\Brother"
|
||||
start "" "Simple Brother SW.bat"
|
||||
goto exit
|
||||
|
||||
:exit
|
||||
exit
|
||||
Loading…
Add table
Add a link
Reference in a new issue