[Samba] GetPrinter Level 2 does not get devmode

Gerald (Jerry) Carter jerry at samba.org
Thu Oct 10 18:57:01 GMT 2002

On Thu, 10 Oct 2002 Rohit.Wadhwa at tabs.toshiba.com wrote:

> 1. Define your printer as a share or in CUPS as needed.
> 2. Define PRINT$ share with only admin users having write access.
> 3. Restart Samba and make sure printer appears in the server Printers
> folder
> 4. Right-click on the printer in question and choose Properties.
> 5. Respond "NO" to the "Install Driver now prompt"  - Question:  Why
> respond
> "No" at this point? All docs say to do so without explanation.
> 6. Once in the driver dialog go to the Advanced Tab and click on "New
> Driver"
> 7. Select your driver from wherever and make sure it copies to
> \\Server\PRINT$\W32X86\...
> 8. Click on Apply to make sure dialog gets updated with printer-specific
> configuration tabs.
> 9. On General tab, choose Printing Preferences - Basics and switch page
> layouts between portrait and landscape clicking OK in between to update the
> driver.  - I assume at this point the driver Devmode is being set, correct?

Ahh... The general tab is for the per user device mode.  You must do this 
from the advanced tab to set it on the server.

> 10.  The printer is now ready to install on Workstations.
> I see a little bit of a different behaviour. After step 8, I do not see the
> "Printing Preferences" button on the General Tab. I only see the "Printing
> Preferences" button if instead of "Apply" I hit "Ok" and bring up the
> printer properties again. (This I was able to reproduce with a HP LaserJet
> 8100 Series PCL 6 driver). (I am running Samba-2.2.4.)

Yeah.  This is the same thing.  Win2k does this.

Please test again with 2.2.6rc2.  There've been a lot of printing fixes 
since 2.2.4.

> Then if I do step 9, I see that the devmode for my printer is written
> under HKEY_CURRENT_USER\Printers\DevModePerUser and
> HKEY_CURRENT_USER\Printers\DevModes2 on the Windows machine from which I
> was uploading the driver. If I run my program again to get the devmode,
> the Windows API call gets the devmode from the local registry. If I
> delete these registry values, it can only get the PRINTER_INFO_2 with
> null devmode from the server.

cheers, jerry
 Hewlett-Packard                                     http://www.hp.com
 SAMBA Team                                       http://www.samba.org
 --                                            http://www.plainjoe.org
 "SAMS Teach Yourself Samba in 24 Hours" 2ed.       ISBN 0-672-32269-2
 --"I never saved anything for the swim back." Ethan Hawk in Gattaca--

More information about the samba mailing list