| Previous | Next |
| ERROR_INVALID_PRINTER_NAME | ERROR_INVALID_PRINTER_COMMAND |
ERROR_PRINTER_ALREADY_EXISTS
AddPrinter creates a printer object in the target server's print subsystem. Microsoft documents that the call normally fails when an object with the same name already exists. A special case exists for a printer marked pending deletion, where creation parameters can update the existing object instead.
This makes the error a configuration and object-lifetime issue, not evidence that a physical printer was discovered twice. Deployment code should compare the existing queue with the desired state before deciding whether to reuse, update, rename, or remove it.
Reconcile instead of looping
- Enumerate the existing printer and retrieve its driver, port, processor, attributes, and share configuration.
- Check whether another installer or administrator created the queue concurrently.
- Record pending-deletion and queued-job state if deletion was attempted immediately before recreation.
- Use SetPrinter for supported updates rather than repeatedly calling AddPrinter with the same object name.
Microsoft AddPrinter behavior · SetPrinter · Samba printer administration with spoolss RPC
Looking for a different code? Search another status or error code.