Initial Release Batch Version
This commit is contained in:
commit
c1383fcd0c
26 changed files with 1783 additions and 0 deletions
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!"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue