Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Printing to network printer from windows service

$
0
0

I have created a windows service with C# that is running as Local System. I would like to print from that service to a network printer. For printing the service should use the default printer for the currently logged on windows user. Is there a way to find out that user/printer?

I already found a way to find all available printer with WMI (Select * from win32_Printer). But now I also need to get the information which of that printers is the default printer for the current user.


Viewing all articles
Browse latest Browse all 31927

Trending Articles