Author Topic: Zentyal & Windows XP Network Printer Drivers Fix  (Read 10917 times)

SeanPF

  • Zen Monk
  • **
  • Posts: 79
  • Karma: +2/-0
    • View Profile
Zentyal & Windows XP Network Printer Drivers Fix
« on: November 01, 2010, 09:38:40 pm »
HOW TO CONNECT A NETWORK PRINTER TO THE ZENTYAL SERVER AND GET WINDOWS XP DOMAIN USERS TO AUTOMATICALLY MAP THE NETWORK PRINTER UPON LOGON

The problem: It is easy to connect Zentyal to a network printer using CUPS, and it's easy to share the printer so that Windows XP workstations can see it. It is also easy to automatically map the workstation to the printer when a user logs on. The problem is with the drivers.

When a Windows XP computer tries to map a network printer connected to Zentyal, you get an error message saying that the server has incorrect drivers installed, and then you have to select a driver from a large list. You have to do this on every workstation! But there is a workaround. We can upload the correct Windows driver from a workstation to the server so that every subsequent workstation that maps to the network printer will use the correct driver automatically, and you won't have to manually choose it each time.

1. Connect the network printer to Zentyal: Use the web interface and go to Print Sharing. Tell it to listen to the interface that your internal network is connected to so it will forward print requests from workstations to the printer. From there you can open the CUPS user interface. Go through the steps to add a printer. It doesn't really matter which printer driver you use because we will change it later by uploading new drivers from a workstation, but try to find the right one anyway. Give the printer a name and make sure you check the box to share the printer.

2. Upload the correct Windows driver to the server via a workstation connected to the domain: a) Log on to the domain from a Windows XP workstation using the network administrator username. b) Open Windows Explorer and navigate to My Network Places>Entire Network>Microsoft Windows Network>Your Domain. c) Right-click on the new printer share icon and select the Properties entry. This may open  a dialog box that indicates that "The printer driver is not installed on this computer. Some printer properties will not be accessible unless you install the printer driver. Do you want to install the driver now?" It is important if this pops up at this point to answer “No”. d) Go to the Advanced tab and click the New Driver button that is next to the Driver box. This launches the "Add Printer Wizard". e) Select the correct printer driver and click Finish to start the driver upload. f) When it is finished uploading, you need to change one setting (i.e. The paper size or something) and apply the changes. This is a weird thing that is necessary so that the printer settings are initialized in the Samba printers database. Click Apply to commit your settings. Revert any settings you changed just to initialize the Samba printers database entry for this printer.

3. Automatically map the workstations to the network printer upon logon: On the Zentyal server, navigate to /home/samba/netlogon and edit your logon.bat file. Add the following two lines to your logon file, the first one adds the printer, and the second line sets it as default:

rundll32 printui.dll,PrintUIEntry /in /n \\NameOfServer\NameOfPrinter
rundll32 printui.dll,PrintUIEntry /y /n\\NameOfServer\NameOfPrinter

4. Test It: Now log on to a domain workstation as a regular user. The logon bat should run, and you will see a windows briefly appear indicating that it is connecting to the network printer; this time you won't get an error message saying that the wrong driver is installed. Go to Start>Printers & Faxes, your network printer should be listed there and set as default.
« Last Edit: November 01, 2010, 09:40:39 pm by seanpf »

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: Zentyal & Windows XP Network Printer Drivers Fix
« Reply #1 on: November 01, 2010, 10:34:15 pm »
Thanks for sharing this!
Zentyal Server Lead Developer

cougarmaster

  • Zen Monk
  • **
  • Posts: 80
  • Karma: +0/-0
    • View Profile
Re: Zentyal & Windows XP Network Printer Drivers Fix
« Reply #2 on: November 03, 2010, 04:11:33 am »
Make this sticky?

Tks
Eric

philmills

  • Zen Warrior
  • ***
  • Posts: 161
  • Karma: +8/-0
    • View Profile
Re: Zentyal & Windows XP Network Printer Drivers Fix
« Reply #3 on: March 07, 2011, 06:22:53 pm »
Really awesome, this is the only well explained method I have seen anywhere.
top marks!

Only issue I have is that no matter what paper size I set at server, the user's paper size always defaults to Letter size...  I want A4, but I can't make it stick.

nachico

  • Zentyal Staff
  • Zen Samurai
  • *****
  • Posts: 338
  • Karma: +31/-1
    • View Profile
    • Learning To Fly
Re: Zentyal & Windows XP Network Printer Drivers Fix
« Reply #4 on: June 28, 2011, 08:43:41 pm »
Hi seanpf,

is it ok if we add this great howto to the community documentation? Are you comfortable with the terms?

Thanks. Regards,
CEO at Zentyal

SeanPF

  • Zen Monk
  • **
  • Posts: 79
  • Karma: +2/-0
    • View Profile
Re: Zentyal & Windows XP Network Printer Drivers Fix
« Reply #5 on: August 10, 2011, 08:51:33 pm »
Wow, sure. I'd be honored.

nachico

  • Zentyal Staff
  • Zen Samurai
  • *****
  • Posts: 338
  • Karma: +31/-1
    • View Profile
    • Learning To Fly
Re: Zentyal & Windows XP Network Printer Drivers Fix
« Reply #6 on: August 11, 2011, 01:12:59 am »
Done! It is now on a howto in the community repository, there is a direct link from the community documentation and I have added your nickname to the special thanks page.

Let me know if you want anything changed or you prefer to have your real name displayed instead of your nickname. Or just log into the wiki with your forum username/password and feel free to change it yourself if you prefer. Thanks again!
CEO at Zentyal

idroy

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Zentyal & Windows XP Network Printer Drivers Fix
« Reply #7 on: September 22, 2011, 02:56:55 am »
Thank you for sharing this.

I am looking for quite a similar solution as I have been having problems with the machine installed with a windows XP not recognizing some computers connected to the same network. Though others are being able to access the printer.

I found the problem to be in the settings concerning Print Sharing.

mithamopolycap

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
Re: Zentyal & Windows XP Network Printer Drivers Fix
« Reply #8 on: October 01, 2011, 11:44:14 am »
Hope this fix works because am on a windows 7 network!
great things