Announcement

Collapse
No announcement yet.

Printui.dll doesn't create printer port? (was: Reply)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Printui.dll doesn't create printer port? (was: Reply)

    When calling printui.dll with the following syntax:
    RUNDLL32 PRINTUI.DLL,PrintUIEntry /if /b "printersharename" /f "hpc4x50c.inf" /r "\\printserver\printersharename" /m "HP Laserjet 4350 PCL 6"

    It will create a valid, useable printer, but will not create any port for the printer. After deleting the printer, if you try to reinstall it (as a local printer, mind you) using the Add/Remove Printer GUI, the "Add Port" dialog will complain that the port "\\printserver\printersharename" already exists, and therefore cannot be created, but this port does not show up in the printer ports list in "RUNDLL32 PRINTUI.DLL,PrintUIEntry /s".

    The only apparent ways to resolve this issue are to reinstall Windows, or write an application using the DeletePort function in WinSpool.drv to delete the port. The AddPort functions in WinSpool.drv are exported by the print monitor, in this case, localspl.dll, as entrypoint SplAddPort.

    Does anyone know where localspl.dll stores the port information when SplAddPort is called?
    Last edited by thekod; 16th July 2008, 07:14. Reason: Correcting title

  • #2
    Re: Printui.dll doesn't create printer port? was(Reply)

    Title has been changed as requested.
    Also cleaned the topic a bit.
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment

    Working...
    X