Hallo
Ich bin gerade auf der Suche, automatisiert, einen (im Moment unsignierten) (TIFF)Druckertreiber per MSI/Installshield11/11.5 zu installieren.
Leider bin ich diesbezüglich absolut unbedarft. Ich habs mit DPInst und auch dem Device-Driver Wizard auf Installshield 11.5 versucht (in der Version 11 beschwert sich installshield noch, weil die Treiber nicht signiert sind).
Beide Installer installieren auf brav, nur leider entsteht halt kein neuer Drucker-Eintrag.
Von Hand installier ich den Drucker indem ich
* einen neuen Drucker Hinzufüge
* einen lokalen Port aussuche oder einen neuen erstelle
* dann das entsprechende .inf File wähle
und das wars dann.
Ich vermute dass bei dem MSI irgendwie die verbindung
zwischen den DLLs und dem Drucker(Port) fehlt ..
hat mir da jemand ein paar Ideen/Vorschläge/URLs ??
mit freundlichen Grüßen
Volker Graf
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Drucker installieren
Started by
LaermTot
, Feb 16 2006 16:08
2 replies to this topic
Posted 16 February 2006 - 17:42
Hmm also bissher hab ich folgenden Weg hinbekommen:
1) Port erzeugen:
'******** Register prnadmin.dll file on client computer *******
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Run "regsvr32 /s Prnadmin.dll",1,TRUE
'************** Create the port first *******************************
dim oPort
dim oMaster
set oPort = CreateObject("Port.Port.1")
set oMaster = CreateObject("PrintMaster.PrintMaster.1")
oPort.PortName = "TIFFPRINTERPORT"
oPort.PortType = 3
oMaster.PortAdd oPort
if Err <> 0 then
msgbox "There was an error creating the port."
end if
WshShell.Run "InstallPrinter.cmd"
2) Printer anlegen:
rundll32 printui.dll,PrintUIEntry /if /b "Bla Drucker" /f "Levigo.inf" /r "TIFFPRINTERPORT" /m "Tiff Printer"
Leider hab ich es bissher nicht geschafft über Prnadmin.dll einen Drucker
zu installieren, da so wie es aussieht immer hart auf <windir>/int/ntprint.inf
referenziert wird und "mein" Drucker natürlich dort nicht vorhanden ist ..
hat hierzu jemand eine oder auch zwei Ideen ?? =)
mfG
Volker Graf
1) Port erzeugen:
'******** Register prnadmin.dll file on client computer *******
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Run "regsvr32 /s Prnadmin.dll",1,TRUE
'************** Create the port first *******************************
dim oPort
dim oMaster
set oPort = CreateObject("Port.Port.1")
set oMaster = CreateObject("PrintMaster.PrintMaster.1")
oPort.PortName = "TIFFPRINTERPORT"
oPort.PortType = 3
oMaster.PortAdd oPort
if Err <> 0 then
msgbox "There was an error creating the port."
end if
WshShell.Run "InstallPrinter.cmd"
2) Printer anlegen:
rundll32 printui.dll,PrintUIEntry /if /b "Bla Drucker" /f "Levigo.inf" /r "TIFFPRINTERPORT" /m "Tiff Printer"
Leider hab ich es bissher nicht geschafft über Prnadmin.dll einen Drucker
zu installieren, da so wie es aussieht immer hart auf <windir>/int/ntprint.inf
referenziert wird und "mein" Drucker natürlich dort nicht vorhanden ist ..
hat hierzu jemand eine oder auch zwei Ideen ?? =)
mfG
Volker Graf
Posted 17 February 2006 - 13:35
Hätte mir jemand ein paar Tipps, wie ich dieses VBS-Script über
den InstallShield oder sonst was, was mir ein MSI-Erzeugt ausführen
kann ??
Hier noch eine etwas bessere Version:
' *********************************************
' Register prnadmin.dll file on client computer
' **********************************************
msgbox "There was an error creating the port."
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Run "regsvr32 /s support\Prnadmin.dll",1,TRUE
dim oPort
dim oMaster
dim doesexist
set oPort = CreateObject("Port.Port.1")
set oMaster = CreateObject("PrintMaster.PrintMaster.1")
' *******************************************************
' Check, if the Local Printer Port "XXXLOCAL" does exist
' *******************************************************
for each oPort in oMaster.Ports
if StrComp(oPort.PortName ,"XXXLOCAL") = 0 then
doesexist="TRUE"
end if
next
' *********************************
' Only create Port, if not existing
' *********************************
if StrComp(doesexist,"TRUE") = 0 then
else
set oPort = CreateObject("Port.Port.1")
set oMaster = CreateObject("PrintMaster.PrintMaster.1")
oPort.PortType = 3
oPort.PortName="XXXLOCAL"
oMaster.PortAdd oPort
if Err <> 0 then
msgbox "There was an error creating the port."
end if
end if
' ****************************
' Finally, install the Printer
' ****************************
WshShell.Run "rundll32 printui.dll,PrintUIEntry /if /b ""XXX TIFF Drucker"" /f ""XXX.inf"" /r ""XXXLOCAL"" /m ""Tiff Printer""",1,TRUE[code=auto:0]
den InstallShield oder sonst was, was mir ein MSI-Erzeugt ausführen
kann ??
Hier noch eine etwas bessere Version:
' *********************************************
' Register prnadmin.dll file on client computer
' **********************************************
msgbox "There was an error creating the port."
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Run "regsvr32 /s support\Prnadmin.dll",1,TRUE
dim oPort
dim oMaster
dim doesexist
set oPort = CreateObject("Port.Port.1")
set oMaster = CreateObject("PrintMaster.PrintMaster.1")
' *******************************************************
' Check, if the Local Printer Port "XXXLOCAL" does exist
' *******************************************************
for each oPort in oMaster.Ports
if StrComp(oPort.PortName ,"XXXLOCAL") = 0 then
doesexist="TRUE"
end if
next
' *********************************
' Only create Port, if not existing
' *********************************
if StrComp(doesexist,"TRUE") = 0 then
else
set oPort = CreateObject("Port.Port.1")
set oMaster = CreateObject("PrintMaster.PrintMaster.1")
oPort.PortType = 3
oPort.PortName="XXXLOCAL"
oMaster.PortAdd oPort
if Err <> 0 then
msgbox "There was an error creating the port."
end if
end if
' ****************************
' Finally, install the Printer
' ****************************
WshShell.Run "rundll32 printui.dll,PrintUIEntry /if /b ""XXX TIFF Drucker"" /f ""XXX.inf"" /r ""XXXLOCAL"" /m ""Tiff Printer""",1,TRUE[code=auto:0]
Edited by LaermTot, 17 February 2006 - 13:36.