Printer Spooler - registry issue RRS feed

  • Question

  • Hi,

    I have an application that dynamically create/delete printers. It does that by using Printer Spooler API functions
    AddPrinter and DeletePrinter. This works fine except printers are not always deleted from registry (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers).
    There are key's left (<printer name>,<some_number>) in the registry after delete printer.

    What cause this issue? How to solve this?

    Note that restart print spooler does not help.

    Monday, November 11, 2019 3:56 PM

All replies

  • Hi iz111,

    This forum is discussing and asking questions about the Windows Forms. It will be more appropriate to ask your question at Developer Community.

    Thank you for your understanding.

    Best Regards,

    Daniel Zhang

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, November 12, 2019 5:39 AM