Druckertreiber Import/ Installation

Post Reply
User avatar
ksoeder
Posts: 71
Joined: 09. Oct 2017, 21:01
Location: Hamburg
Contact:

Druckertreiber Import/ Installation

Post by ksoeder » 04. Aug 2023, 08:14

Moin zusammen,

ich habe ein Problem mit dem Import eines Druckertreibers von Honeywell (Etikettendrucker). :(
Um festzustellen welche Methode für das Paket dann am Besten funktioniert habe ich folgendes ausprobiert:
- Druckermigration (PrintBmr.exe)
- PNPUtil.exe mit /adddriver
- Diff-Paket (darin enthalten manuell kopierte Dateien, sowie Reg-Keys und Ini-Dateien)

All die Versuche scheitern im Endeffekt immer an dem gleichen Problem mit der Windows-Sicherheit (Siehe Screenshot anbei).
Diese sorgt (ja zu Recht) dafür, dass nur Treiber von vertrauenswürdigen Quellen installiert werden.
Wenn ich den Import/ Install des Treiber händisch ausführe, bekomme ich den Dialog angezeigt und kann diesen bestätigen.
Jedoch möchte ich ja den Import über das Paket automatisieren und habe bisher keinen Weg gefunden, der funktioniert. :shock:

Hat jemand von Euch damit schon zu tun gehabt und evtl. eine Lösung gefunden :?:

Und ja, beim Hersteller haben wir das derzeit aktuellste Treiberpaket bezogen. (Was sogar ein gültiges Zertifikat mitbringt)

Danke. :mrgreen:
Attachments
2023-08-02_14-26-19.png
(11.74 KiB) Downloaded 71 times
Beste Grüße
Klaus
---------------------------------------------------------------------------------------------------------------------
Windows Srv 2016 | Empirum 22.0.1.6711 | DB 22.01 | UEMAgent 2303.1.2 SFR
---------------------------------------------------------------------------------------------------------------------
...Have you tried an unexpected reboot? :shock:

StephanSch
Posts: 60
Joined: 03. Jul 2010, 20:20
Location: Berlin
Contact:

Re: Druckertreiber Import/ Installation

Post by StephanSch » 04. Aug 2023, 08:35

Meines Erachtens machen wir im Paket die Prüfung kurz aus und danach wieder an:

Code: Select all

[Product]
#Set:Port,DONTDELETE
#Reg:DrivSig1, DONTDELETE
#Set:Inst, DONTDELETE
#Set:Deinst, DELETE
#Reg:OnUninstallProduct, DELETE
#Reg:Product
#Set:Settings, MACHINE
#Reg:DrivSig2, DONTDELETE

[Reg:DrivSig1]
HKLM,"SOFTWARE\Microsoft\Driver Signing","Policy",0x00000001,00,00,00,00

[Reg:DrivSig2]
HKLM,"SOFTWARE\Microsoft\Driver Signing","Policy",0x00000001,01,00,00,00
Empirum 23.0.1; Service Store/DWP 12.0
Windows Server 2019
Clients: Windows 10 Enterprise x64 21H2

User avatar
ksoeder
Posts: 71
Joined: 09. Oct 2017, 21:01
Location: Hamburg
Contact:

Re: Druckertreiber Import/ Installation

Post by ksoeder » 04. Aug 2023, 10:59

Hallo StephanSch,

ja, gute Idee! In die Richtung hatte ich auch schon gedacht, aber mir fehlte der Registrywert.
Habe es gerade mal ausprobiert. Der Dialog mit der Windows-Sicherheit kommt trotzdem hoch. :shock: (Neustart zwischen Registry ändern habe ich gemacht).
Man muss dazu sagen, dass der Windows Client mit Windows 10 22H2 sowie SecureBoot läuft. Lt. Recherche kann man die Prüfung der Treibersignatur nur abstellen, wenn SecureBoot aus ist und mit F8 der Modus gewählt wird wo keine Treibersignaturprüfung gemacht wird. :|
Sicherheit hat scheinbar seinen Preis... :roll:

Hat jemand noch eine Idee was man machen könnte?
Beste Grüße
Klaus
---------------------------------------------------------------------------------------------------------------------
Windows Srv 2016 | Empirum 22.0.1.6711 | DB 22.01 | UEMAgent 2303.1.2 SFR
---------------------------------------------------------------------------------------------------------------------
...Have you tried an unexpected reboot? :shock:

StephanSch
Posts: 60
Joined: 03. Jul 2010, 20:20
Location: Berlin
Contact:

Re: Druckertreiber Import/ Installation

Post by StephanSch » 04. Aug 2023, 11:32

Hmm, SecureBoot haben an von Anfang an, aber vorrangig 21H2. Von 22H2-Nutzern habe ich aber bisher keine Probleme gehört. Wobei Drucken im Büro heutzutage ja auch nicht mehr verbreitet ist.

Hier mal unser komplettes Skript ab Product, vlt. hilft noch ein anderer Part daraus

Code: Select all

[Product]
#Set:Port,DONTDELETE
#Reg:DrivSig1, DONTDELETE
#Set:Inst, DONTDELETE
#Set:Deinst, DELETE
#Reg:OnUninstallProduct, DELETE
#Reg:Product
#Set:Settings, MACHINE
#Reg:DrivSig2, DONTDELETE

[Set:Port]
Stopservice Spooler
Set KeyName=%Printer-Hostname%
if %Printer-hostname% == "" Then "Set:IP-KeyName" EndIf
#Reg:Port
Startservice Spooler

[Set:Settings]
; Set printer driver settings (like number of trays, etc.)
call rundll32 printui.dll,PrintUIEntry /q /Sr /n "%Productname%" /a "settings.dat"

[Set:IP-Keyname]
Set Keyname=IP_%Printer-IP-Address%

[Set:Inst]
call rundll32 printui.dll,PrintUIEntry /dl /n "%Productname%" /q
; Install printer driver
; /z: do not share printer - remove if causes error!
call rundll32 printui.dll,PrintUIEntry /if /b "%Productname%" /f "%~Src%\Driver\%Printer-DriverFile%" /r "%KeyName%" /m "%Printer-Name%" /q /z

; Check if RUNDLL-call has been successful
if DoesRegKeyExist ("HKLM,SYSTEM\CurrentControlSet\Control\Print\Printers\%Productname%\DsDriver) <> "1" then "Error" endif

[Set:Deinst]
; This line deinstalls the printer driver during deinstallation (setup /u)
-call rundll32 printui.dll,PrintUIEntry /dl /n "%Productname%" /q

[Error]
ErrorLogMsg An error occured during the printer driver installation!
StartService Spooler
Abort

[Reg:OnUninstallProduct]

[Reg:Product]

[Reg:DrivSig1]
HKLM,"SOFTWARE\Microsoft\Driver Signing","Policy",0x00000001,00,00,00,00

[Reg:DrivSig2]
HKLM,"SOFTWARE\Microsoft\Driver Signing","Policy",0x00000001,01,00,00,00

[Reg:Port]
; Creates TCP/IP-printer-port
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\%KeyName%","Queue",0x00000000,"SecurePrintIdealo"
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\%KeyName%","Double Spool",0x00010001,"0x00000001"
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\%KeyName%","HostName",0x00000000,"%Printer-Hostname%"
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\%KeyName%","HWAddress",0x00000000,""
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\%KeyName%","IPAddress",0x00000000,"%Printer-IP-Address%"
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\%KeyName%","PortNumber",0x00010001,%Printer-Port%
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\%KeyName%","Protocol",0x00010001,"0x00000002"
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\%KeyName%","SNMP Community",0x00000000,"public"
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\%KeyName%","SNMP Enabled",0x00010001,"0"
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\%KeyName%","SNMP Index",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\%KeyName%","Version",0x00010001,1
Empirum 23.0.1; Service Store/DWP 12.0
Windows Server 2019
Clients: Windows 10 Enterprise x64 21H2

munzur
Posts: 262
Joined: 23. Jun 2020, 19:26
Contact:

Re: Druckertreiber Import/ Installation

Post by munzur » 04. Aug 2023, 13:34

Taucht die Meldung auch auf, wenn man das Zertifikat vorher in den Trusted Publisher Store importiert?

Falls nein, könnte man dies per Paket vorab lösen:

Callhidden %System%\certutil.exe -addstore -f "trustedpublisher" "%SRC%\NamevomZertifikat.cer"

User avatar
ksoeder
Posts: 71
Joined: 09. Oct 2017, 21:01
Location: Hamburg
Contact:

Re: Druckertreiber Import/ Installation

Post by ksoeder » 14. Aug 2023, 10:55

Hallo StephanSch, Hallo Munzur,

ich war eine Woche nicht am Platz und habe mir heute Eure Tipps angeschaut.
Geholfen hat nun tatsächlich der Import des Zertifikats in den "TrustedPublisher"-Store.
Zuvor hatte ich das Zertifikat zwar schon mal importiert. Dieses wird aber nicht standardmäßig in den "TrustedPublisher"-Store importiert. Erst mit dem Befehl von Munzur hat es dann geklappt den Treiber mit PnpUtil zu importieren, weil das Zertifikat im "richtigen" Store liegt.

Danke Euch für die Hilfe.
Beste Grüße
Klaus
---------------------------------------------------------------------------------------------------------------------
Windows Srv 2016 | Empirum 22.0.1.6711 | DB 22.01 | UEMAgent 2303.1.2 SFR
---------------------------------------------------------------------------------------------------------------------
...Have you tried an unexpected reboot? :shock:

Post Reply

Return to “Paketierung”

Who is online

Users browsing this forum: No registered users and 1 guest