[wpkg-users] strange network printer share print driver deployment issue

Rainer Meier r.meier at wpkg.org
Mon Apr 4 09:09:04 CEST 2011


Hi Mike,

On 01.04.2011 15:35, Mike Burgener wrote:
> very happy with wpkg, but i have a very very strange issue at the 
> moment.
> 
> Wen want to deploy printer drivers using wpkg during boot, there is a 
> script which is executed by wpkg:
> 
> cmd-script
> http://pastebin.com/A0VpTEUp
> 
> the wpkg-package file:
> http://pastebin.com/xcqW5HnJ
> 
> if i manually run the .cmd file, it works.
> 
> Server on which the script is run is "servera" but the printers rely on 
> "serverb", if i'm logged in using a network user the script works, 
> however if i run it without network user the .cmd just hangs while 
> executing the first "rundll" part.
> 
> However i tried to implement a workaround by doing the "net use" first, 
> but this did not help either.
> 
> But if i do the "net use" first while testing without wpkg as a local 
> user, it does fix it.
> 
> The strange thing on some workstations it seems to function but on other 
> not and all seem to have the same installation.
> 
> Any suggestions or ideas?

In fact I had many issues as well deploying printer drivers. The main issue I've
discovered is that Windows (mainly tested on XP) does not accept unsigned
printer drivers when the printer is added by as service running in SYSTEM
context (usual case when WPKG is run as WPKG client service).

When installing a driver manually it does not require to be signed. But when
executed in system context I found "rundll32 printui.dll,PrintUIEntry" hanging.

However in my case it was very special as I had to deploy a virtual printer. In
your case it seems to be a network printer shared by some print server which is
likely to serve the driver too. Not sure if it serves unsigned drivers though.

In my case I just opened the printer inf file and found the "CatalogFile" and
"DriverVer" entries missing in the "[Version]" section.
I've created my own certificate (self-signed) and used inf2cat to create the
missing catalog file after adding the missing entries to the inf file.
Then I've signed the catalog file using signtool and my self-signed certificate.

Then I just installed the driver using rundll32 as well:
rundll32 printui.dll,PrintUIEntry /if /b "%PRINTER_MODEL%" /f "%INF_PATH%" /r
"%PORT_NAME%" /m "%PRINTER_MODEL%" /u

(NOTE: As I wrote this is for a local printer installation, but I think you can
install remote printers as well using local INF files - so pointing "%INF_PATH%"
to a path on your share)


So just check first if your drivers are correctly signed.




> Besides that, can be donated to wpkg?

Well, there is some donation information on the main wpkg.org page.

br,
Rainer



More information about the wpkg-users mailing list