Where is the default printer specified?

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

Any one know where or what the registry entry is for the
default printer for Windows 2000 or XP? I have a
distributed application running on a report server that
takes report requests from client workstations, and then
returns the reports back to the requestors, ready to
print. This application has to be able to set the default
printer and print to it. The intent is to enable the
report server to automatically send a requested report,
directly to the specified printer without user
intervention. I couldn't find a registry entry that
specified the default printer. I'm looking to do this via
the registry, because the app is written in Powerbuilder
9.01, and I don't have access to a server scripting
language.
 
Any one know where or what the registry entry is for the
default printer for Windows 2000 or XP?

HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\Windows:Device

The string contains the printer name, spooler name and the
internal printer port name. The printer port name for
network devices will look like "Ne02:". The port name will
differ from workstation to workstation because the name is
created (dynamic) during installation of the printer
device.
This application has to be able to set the default
printer and print to it. The intent is to enable the
report server to automatically send a requested report,
directly to the specified printer without user
intervention.

Set a default printer through command line:
rundll32 printui.dll,PrintUIEntry /y /n "printer name"
I couldn't find a registry entry that
specified the default printer. I'm looking to do this via
the registry, because the app is written in Powerbuilder
9.01, and I don't have access to a server scripting
language.

Sorry, I don't know the limitations of PowerBuilder. Are
you able to use API calls or calls to external commands?

Ciao, Walter
 
Back
Top