R
Rajneesh Sehgal
Hi,
I am currently creating a setup for installing printer drivers in Windows
2000 and XP. I have tried using the printui.dll,PrintUIEntry function and it
works like a charm and i have no issues.
Sample:
rundll32 printui.dll,PrintUIEntry /q /ia /m "hp deskjet 640c series" /h
"Intel" /v "Windows 2000" /f c:\dj640\hpf640k.inf
rundll32 printui.dll,PrintUIEntry /q /if /b "HP648C" /f c:\dj640\hpf640k.inf
/r "lpt1:" /m "hp deskjet 640c series"
The problem i have with this approach is that i am not able to get the error
code to abort the setup if something fails.
What i am looking for is to know what exactly is the
printui.dll,PrintUIEntry function doing internally. I want to write my own
code to do whatever printui.dll,PrintUIEntry does so that i can add some
error handling.
My guess is that it must be calling AddPrinterDriver and AddPrinter to
install and register the printer. I am wondering how does it actually copies
the files mentioned in the printer INF file to the appropriate printer
directory returned by GetPrinterDirectory function. I am specifically
looking for that piece of code.
Can any of the MSFT guys throw some light on this?
Thanks,
Rajneesh...
I am currently creating a setup for installing printer drivers in Windows
2000 and XP. I have tried using the printui.dll,PrintUIEntry function and it
works like a charm and i have no issues.
Sample:
rundll32 printui.dll,PrintUIEntry /q /ia /m "hp deskjet 640c series" /h
"Intel" /v "Windows 2000" /f c:\dj640\hpf640k.inf
rundll32 printui.dll,PrintUIEntry /q /if /b "HP648C" /f c:\dj640\hpf640k.inf
/r "lpt1:" /m "hp deskjet 640c series"
The problem i have with this approach is that i am not able to get the error
code to abort the setup if something fails.
What i am looking for is to know what exactly is the
printui.dll,PrintUIEntry function doing internally. I want to write my own
code to do whatever printui.dll,PrintUIEntry does so that i can add some
error handling.
My guess is that it must be calling AddPrinterDriver and AddPrinter to
install and register the printer. I am wondering how does it actually copies
the files mentioned in the printer INF file to the appropriate printer
directory returned by GetPrinterDirectory function. I am specifically
looking for that piece of code.
Can any of the MSFT guys throw some light on this?
Thanks,
Rajneesh...