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 something in python-win32 I can do to get the same results.
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 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 <jo...@jfcomputer.com
<mailto:jo...@jfcomputer.com>> wrote:
Hi,
I need a way to determine the default printer (on the users
computer) from a RDP session.
The user logs on to a RDP session and
win32print.GetDefaultPrinter() returns a blank. That makes sense
on the RDP session because there aren't any default printers. RDP
printing is directed to the default printer on the users desktop.
Is there a way to get the default printer from the RDP session.
Johnf
_______________________________________________
python-win32 mailing list
python-win32@python.org <mailto:python-win32@python.org>
https://mail.python.org/mailman/listinfo/python-win32
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32