WMI Printer Class Programming

I

ISA

I am trying to script printer creation for new PCs. As I build a PC, I want
a script to create Printer Ports, Printer Drivers, Printer entries and set
certain parameters related to the printer.

I know of and am using the prnport.vbs, prndrvr.vbs, prnmngr.vbs and
prncnfg.vbs to do most of this.

I cannot find any options to set the following parameters...

If you look at Printer Properties under the Device Settings tab, I need to:
set the PaperType in "Tray 3"
set the "Duplex Unit" to Installed
set Total Printer Memory to 36MB or More.

If you look at Printer Properties, Printing Preferences, I need to:
set the "Print on Both Sides" (Duplex Option) option to Flip on Long Edge
set the Pages Per Sheet" (Default Number Up) to 2
set the "Paper Source" to Tray 3
In the Advanced Options of Printing Preferences, I need to:
set "Paper Size" to 11x17

In summary, need to set the following Printer Property Parameters:

Form to Tray assignment:
Tray 3 (Paper Type)

Installable Options:
Duplex Unit
Total Printer Memory

Print On Both Sides = Flip on Long Edge
Pages Per Sheet = 2 (I think I can use prncnfg.vbs to set it)
Paper Source = Tray 3
Paper Size = 11x17

I am hoping to find a WMI Class I can use to set these parameters via a
script.
If I must update the registry, can someone let me know what the KEYS are and
how perform registry updates in a script?

Thanks,
Mike
 
A

Alan Morris [MSFT]

the device mode of the print and driver are not exposed to WMI.

It's a blob in the registry.

You need setprinter.exe from the Windows Resource Kit to change these
settings



--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/search/?adv=1

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top