My application started as a windows service which does not see printer installed on my PC.
But if this application is started as a regular windows application it can see this printer.
How can I install this printer, which should be accessible from windows service?
I need to send pdf files to this printer from a windows service. But windows service does not see my printer.
Windows service uses a Win API function EnumPrinters to get the list of printers.
Also, Win API function GetDefaultPrinter does not return default printer if this function is called from a windows service.
OS - Windows 7.
Printer - HP LaserJet P2055.
It is installed as network printer on a remote computer.
I install it on my PC using following steps:
1. Open Device and Printers.
2. Add a printer.
3. Add a network printer.
4. Find printer in the directory, based on location or feature.