Multiple copies off the same printer on Windows 7 from PrintUIEntry

Posted by Kev on Server Fault See other posts from Server Fault or by Kev
Published on 2012-06-22T09:12:13Z Indexed on 2012/06/22 9:17 UTC
Read the original article Hit count: 227

Filed under:
|
|

I currently have a number of bat files which work perfectly fine on Windows XP which install the same printer multiple times with a number of finisher options set - e.g. after running the bat file below I would end up with four printers in the printer drop down called

  • Sharp Kits Printer - A4 Single Sided
  • Sharp Kits Printer - A4 Single Sided Stapled
  • Sharp Kits Printer - A4 Duplex Stapled
  • Sharp Kits Printer - A4 Duplex

which all have there options configured in the relevant way.

I have amended on Windows 7 to point to correct INF file and printer name in the INF files - a single printer installs fine.

However when I run the complete batch file only the first printer in it is installed - occassionally the later ones flash up in the GUI but then vanish when you press F5 and are still missing after a reboot.

SET QUEUENAME=http://192.168.7.123:631/printers/Sharp700
SET PPD=J:\DRIVERS\Printers\MX700-Win7-64\SJ1JWENG.INF
SET PPDENTRYNAME=SHARP MX-M700U PPD
J:
cd "\DRIVERS\Printers\MX700-Win7-64"

SET NICENAME="Sharp Kits Printer - A4 Single Sided"
SET PREFS="J:\SCRIPTS\Printers-Win7-64bit\Sharp_SINGLE_SETTINGS.dat"
%SYSTEMDRIVE%\WINDOWS\system32\rundll32.exe %SYSTEMDRIVE%\WINDOWS\system32\printui.dll,PrintUIEntry /w /b %NICENAME% /x /n "part of the n switch"  /f "%PPD%" /if /r "%QUEUENAME%" /m "%PPDENTRYNAME%"
rem restore settings go here...

SET NICENAME="Sharp Kits Printer - A4 Duplex"
SET PREFS="J:\SCRIPTS\Printers\Sharp_DUPLEX_SETTINGS.dat"
%SYSTEMDRIVE%\WINDOWS\system32\rundll32.exe %SYSTEMDRIVE%\WINDOWS\system32\printui.dll,PrintUIEntry /w /b %NICENAME% /x /n "part of the n switch"  /f "%PPD%" /if /r "%QUEUENAME%" /m "%PPDENTRYNAME%"
rem restore settings go here...

I have tried adding the "/u" paramater to the end, I have changed the "/n" paramater to be different (e.g. n1, n2,n3 etc) - both of these result in the same. I have also tried to change the port (/r) to have "_1" (etc) on the end like the GUI would but this errors as the port doesn't exist.

Is it possible to do this on Windows 7, and if so how?

© Server Fault or respective owner

Related posts about Windows

Related posts about printing