3

settings location settings window

I'm trying to automate the setup of printer settings, are settings stored to a standard location? The preference window is just a proprietary driver window

I'm aware of some of the registry values stored here : Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\HP DeskJet 2600 series

Are some settings stored somewhere else? using just those doesn't seem to work

Axeltherabbit
  • 171
  • 1
  • 1
  • 7

3 Answers3

3

There is not one answer for this question, and answers may potentially differ for each printer and each driver.

Many parameters are stored in the registry, but some may be stored by the driver software on disk and some in non-volatile memory on the printer.

Even in the registry, in addition to items that are user-readable, the printer software usually stores the printer's DEVMODE structure. This is a very comprehensive binary structure that is intended to be used by C/C++ programs.

There are also two copies of DEVMODE - one for the default and one for each user. The user's is stored under the HKEY_CURRENT_USER registry key, while the default is stored in HKEY_LOCAL_MACHINE and requires administrator permissions to modify.

Finding out all the the places where printer settings could be stored, would probably entail tracing the printer's installation and settings dialogs, and will be a hard project.

harrymc
  • 498,455
2

HP has a "HP Device Configuration Utility" shown here

enter image description here

and

enter image description here

You open the CFG file found in the driver folder that you downloaded from hp.

Then it presents you with all of these options.

They only question is does it support your printer. If it does then whenever you install said printer it will automatically have these settings.

cybernard
  • 14,924
1

I actually found a way to do that easily,

  • to extract:

    rundll32 printui.dll,PrintUIEntry /Ss /n "PRINTERNAMEHERE" /a File.dat d g

  • to restore:

    rundll32 printui.dll,PrintUIEntry /Sr /n "PRINTERNAMEHERE" /a File.dat u

As other mentioned this might still not work for some printers/drivers but simplifies the job of actually having to figure out where things are

Axeltherabbit
  • 171
  • 1
  • 1
  • 7