I need to get the default printer name. I\'ll be using C# but I suspect this is more of a framework question and isn\'t language specific.
The easiest way I found is to create a new PrinterSettings object. It starts with all default values, so you can check its Name property to get the name of the default printer.
PrinterSettings is in System.Drawing.dll in the namespace System.Drawing.Printing.
PrinterSettings settings = new PrinterSettings();
Console.WriteLine(settings.PrinterName);
Alternatively, you could maybe use the static PrinterSettings.InstalledPrinters method to get a list of all printer names, then set the PrinterName property and check the IsDefaultPrinter. I haven't tried this, but the documentation seems to suggest it won't work. Apparently IsDefaultPrinter is only true when PrinterName is not explicitly set.