Re: [python-win32] determine the default printer from RDP

2020-02-27 Thread john
I have discovered a solution to the issue. import wmi c = wmi.WMI()  wql = "SELECT * FROM WIN32_PRINTER WHERE Default = TRUE"  for printer in c.query(wql):     selectedPrinter = printer.caption where selectPrinter is the device name of the printer. Hope this helps somebody in the future. J

Re: [python-win32] determine the default printer from RDP

2020-02-26 Thread john
I was able to discover that a powershell command does in fact find the correct default printer. powershell.exe -command "& {(Get-WmiObject -class win32_printer | where {$_.default -eq $true}).name}" or  Get-WmiObject -query "SELECT * FROM WIN32_PRINTER WHERE Default = TRUE" is there somethi

Re: [python-win32] determine the default printer from RDP

2020-02-26 Thread Terry Davis
Hi John, In the Windows RDP client, under "Show Options" -> "Local Resources" -> section "Local devices and resources" is "Printers" checked? I haven't tried what you're referring to, but perhaps that setting is relevant to your problem? - Terry On Tue, Feb 25, 2020 at 5:51 PM john wrote: > H

Re: [python-win32] determine the default printer from RDP

2020-02-26 Thread john
Thanks for the response - and yes I do have the printers checkbox - checked.  It returns a blank. Johnf On 2/26/20 8:48 AM, Terry Davis wrote: Hi John, In the Windows RDP client, under "Show Options" -> "Local Resources" -> section "Local devices and resources" is "Printers" checked? I hav