PrintUI.DLL OK why can't I make it work?b

YeOldeStonecat

[H]F Junkie
Joined
Jul 19, 2004
Messages
11,330
Always been a small business network guy...when adding printers to workstations it's easy to browse to the print share from the server, right click and connect..and BAM they're all set.

Taking care of a growing network where I'd like to automate deploying printers. They're still currently on Small Business Server 2003 R2. I went to try the 2K3 R2 Print Management Console method..but that feature of R2 to deploy it via GP seems to be crippled in SBS. There are member servers in this domain which are R2, but I'm finding an issue trying to connect it to a GPO. Maybe more research as I'm not a whiz on GPOs yet.

So I figured to get this one printer rushed out...I'd try the old PrintUI.DLL in the login script.
Seemed simple enough,

The printer is actually a Canon iR2880 Fax which I need to deploy. Treated just like a printer, and it's installed just like a printer when doing the right click connect from the server share. So I thought PrintUI.DLL would be able to do it.

The server sharing it as \\host-17
(not my naming convention..existing server)
The print share is say, iR2880Fax
So \\host-17\iR28880Fax

So I add the following to the login script in my first attempt, reading from Microsofts document "PrintUI.DLL User’s Guide and Reference"

rundll32 printui.dll PrintUIEntry /in /n\\machine\printer
Which I edit to show as
rundll32 printui.dll PrintUIEntry /in /n\\Host-17\iR2880Fax

No love, I Google around more, and find references to having a comma in between .dll and PrintUIEntry, so I change it to
rundll32 printui.dll,PrintUIEntry /in /n\\Host-17\iR2880Fax

Still no love.
So I remote into a server of a buddy of mine who has it working, and he has quotes around the UNC of the printer, so I change it to have that...
rundll32 printui.dll PrintUIEntry /in /n"\\Host-17\iR2880Fax"

Still no love. :(

Anyone got a bone to toss in?
 
Last edited:
RunDll32.EXE printui.dll,PrintUIEntry /in /n \\wha-server\Dell_3115cn_Legal

Thats what I use on my clients.
 
I use the exact same syntax as marley, also remember that printuientry is case sensitive.
 
rundll32 printui.dll,PrintUIEntry /in /n \\SERVER\Canon2230

That is what I've used in the past and it always worked for me. You might also consider using VBscript:

Set objNetwork = CreateObject("WScript.Network")

objNetwork.AddWindowsPrinterConnection "\\SERVER\printer1"
objNetwork.AddWindowsPrinterConnection "\\SERVER\printer2"

Save the text file as printerscript.vbs or something and then link it with a login GPO. works TONS better than the old login script in user properties IMO. :D
 
Thanks Captain! I employed your VBS approach, and it worked instantly. The network this was on is SBS2K3 R2.

Now..to further troubleshoot GPOs on a different network.
This network was originally a Server 2000 domain. I've since added additional servers, having a 2003 R2 take over as the new domain controller. The schema naturally was updated and confirmed to show the version for R2. I have made GPOs and applied them to the OU for the workstations, GPOs being for their WSUS box and a "no games" GPO which takes away the games built into Windows. Those function properly. Within the same OU, I made another GPO called PrintDeploy" and built the above VBS for it. Last week I also tried the native Print Management Console approach that R2 supports..which appeared to build properly, it built the GPO, I could see the little deployed printers object in the bottom of the GPO. But rebooting client workstations over 'n over, the printers never showed up.

Running GPRESULT from a workstation shows the GPOs being applied...the ones for WSUS and NoGames and the PrintDeploy. But...no new printers in the printers folder.

:confused: :(
 
Glad the printer script worked out for you. I'm starting to like VBscript a lot more lately. Was always afraid of it in the past because I hated scripting. But I've been warming up to it the last six months or so and playing with PowerShell, too. :D

Now, on to your other problem. Have you checked the event logs on the computers that aren't getting the printers? Does it happen on all the workstations? XP or Vista OS? Possibly a print driver incompatibility or something maybe?
 
Event viewer from the workstation seems normal
All XP Pro workstations, mixed SP2 and SP3.
Latest drivers from Canons website were used to setup/install the printer on the server.
I even tried doing the same setup with an HP 40something laserjet...no dice.

Doing the old manual install way of browsing to the printer share from the workstation, right clicking the printer..selecting connect..the printer gets added and works fine. So that shows functionally the print drivers and printer and rights/permissions 'n such should be fine.
 
Did u try my command? To see if the printui runs?

I've never had problem with bat or vbs for sharing prints and drives, but I haven't used gpo for it just used the profile section in AD. I got an experts exchange account if you want to use that brian.
 
Hmm, that is odd. Nothing shows up in the app logs or anything concerning userenv or printer or something?

Onsite today, squeeky clean logs on both server and workstation.
To test the GPOs and OU I made a new GP for the Windows XP Firewall in the same exact OU as the printdeploy. As soon as I rebooted one workstation it showed the firewall settings as being set by the GPO.

Doing GPRESULT also showed all 4 GPOs now being applied to the workstation..it's just the dang Canon never shows up in the Printers folder. Nor an additional HP Laser I added for giggles.

//stumped
 
Checking 2 more workstation, only error in apps event logs I saw was userinit related to the pushprinterconnections.exe file I was attempting to push when trying the printui approach.
 
I am seeing on a workstations Event Viewer, System
Event ID 20
User NT Authority\System
Print Driver Canon iR5055/iR5065 PCL 5e for Windows NT x96 Version 3 was added or updated. Files (lists a crapload of .DLLs, .EXEs, etc).

So it appears to be installing from the workstations end...just...not showing up in printers folder.
 
Lol, I tried doing some google searching for answers and all I came back with was a link to this thread. :)

Just for giggles, have you tried uninstalling all the printers and removing the print drivers from the local print server properties?
 
Back
Top