- Installation of unidrv drivers
- Posted by Lis on April 1st, 2005
I'm developing a printer driver based on unidrv and I have to write
and installation procedure (with delphi, using AddPrinterDriver,
AddPrinter, etc).
As I read in this thread http://snipurl.com/printer_driver I
shouldn't distribuite those files (unidrv.*, unires.dll) but I should
let windows install them.
I tried using a "rundll32 printui.dll,PrintUIEntry..." command to
install a "Generic/Text only" printer driver but is not the right
solution for some reasons:
- under windows 2000 I get a message about a digital sign (and I don't
want it)
- in this way are installed also some files that I don't need (tty*)
Wich is the right way? How can I install unidrv files, silently? There
is any website with some suggestion? I think I can "simulate" what
printui.dll does, but where I should get unidrv*.* files to copy in
\system32\spool\..\*
Thank You
Lis
- Posted by Jürgen Hollfelder on April 2nd, 2005
I think it would be good to rather get the driver signed actually and go the
way with rundll32 printui.dll etc.
However if you want to go the way with AddPrinterDriver and AddPrinter then
you simply have to carfully read the SDK documentation. I have no idea about
Delphi. I did it in C. It is a bit tricky and I ran into a couple of
problems before I finally made it. When I afterwards read the SDK
documentation again I thought to myself "Well it is actually all written
there".
You have to copy all files needed to the directory gotten from
GetPrinterDriverDirectory. Then you do the AddPrinterDriver and finally use
AddPrinter.
Regards,
Jürgen Hollfelder
www.hollfelder-edv.de
info@hollfelder-edv.de
"Lis" <lis77@katamail.com> schrieb im Newsbeitrag
news:4db8cc17.0504010710.3e71ec93@posting.google.c om...
- Posted by Lis on April 4th, 2005
"Jürgen Hollfelder" <info@hollfelder-edv.de> wrote in message news:<#Ar5pl5NFHA.2468@tk2msftngp13.phx.gbl>...
My problem is not with my Printer Driver (wich is correctly installed
by my delphi program) but _only_ with unidrv* files. Since I can't
distribuite them with my setup (and not only for legal questions),
there is a way to install them silently?
After many days trying to understand the SDK (I think it is not very
clear), now I'm able to install my printer driver but at the moment I
have to include univer* files in my setup and copy tham "manually" to
\system32\spool\*, and this is what I'm trying to change
Yes, this is exatly what I'm doing now for my printer driver dlls and
it works
best regards
Alessandro Ghezzi
- Posted by Floyd Burger on April 4th, 2005
Delphi? Have you seen the printer driver installation code in TurboPower's
Async Pro? You can get it from www.sourceforge.net/projects/tpapro. The
PInst.dpr example installs their fax printer driver and you can see how they
do it. From what I recall, they automatically extract the files from the
appropriate CAB files.
--
Floyd
"Lis" <lis77@katamail.com> wrote in message
news:4db8cc17.0504032324.6f1df960@posting.google.c om...
- Posted by lis77@katamail.com on April 5th, 2005
Yes, I'm already seen Async Pro but it's quite old and it doesn't
support windows 2000/XP.
By the way, if extracting unidrv* from cab is an "authorized" metod I
can proceed in this way.
In Win2k/XP I found that uni* are in %windows%\Driver
Cache\i386\driver.cab, is it right?
Can I extract uni* files from it, if I don't found them in
\system32\spool\* ?
I found also the file %windows%\inf\drvindex.inf wich seems containing
the list of all files in %windows%\Driver Cache\i386\*.cab.
For example I have on my pc 2 cabs: driver.cab and sp3.cab (I use
win2000 sp3).
Drvindex.inf I starts with:
[Version]
signature="$Windows NT$"
CabFiles=sp3,driver
Do I have to scan sequentially cab files using the order specified
(sp3, driver in ths case) to find uni* files?
Thank you
Lis
- Posted by Floyd Burger on April 5th, 2005
Drvindex.inf tells you which CAB the file is in. The files listed in
[driver] are in the cab specified by the 'driver' entry in the [cabs]
section; likewise for the [sp2] entries. Once you know which cab to use,
you can use the code from APRO that extracts the rasdd files. The cabs will
be located in the <systemroot>\Driver Cache\<platform>\ folder (i.e.,
c:\windows\driver cache\i386).
--
Floyd
<lis77@katamail.com> wrote in message
news:1112698885.197108.216790@o13g2000cwo.googlegr oups.com...
- Posted by lis77@katamail.com on April 6th, 2005
Thank you very much, it seems working.
Another, last, question: at the moment I assume that drvindex.inf and
<systemroot>\Driver Cache\<platform> are "constant" in Windows 2000, XP
and 2003 server. Is this right?
Lis
- Posted by Floyd Burger on April 6th, 2005
According to what I've read on the MSDN sites and seen on my own systems;
yes, it's constant. You can search for drvindex.inf on MSDN to find the
articles.
--
Floyd
<lis77@katamail.com> wrote in message
news:1112772717.075982.269180@z14g2000cwz.googlegr oups.com...