Utilities

Windows 2000 provides several utilities to help you administer your network printing resources.

rundll32

Some enterprise configurations require clients to connect to network printers during an unattended setup. Microsoft facilitates this with the rundll32 command, which allows printers to be installed from the command line. This is particularly useful when you need to add or remove printers from a group of users by means of a logon script.

The rundll32 command provides greater control than older supplemental utilities such as Con2prt.exe, which allowed only for the addition and deletion of networked printers. For example, the rundll32 command allows local printers to be modified and deleted. It also allows you to add printer connections by computer rather than by user as the Add Printer Wizard does. The result is that you can control all aspects of the end user's printing experience by running a local or remote batch file or logon script containing rundll32 commands.

The case-sensitive syntax for the rundll32 command is:

rundll32 printui.dll,PrintUIEntry <options>

Examples of useful options include:

rundll32 printui.dll,PrintUIEntry /il /c\\computer

This installs a printer for the user logged on a remote computer named computer by running the Add Printer Wizard. You can also type:

rundll32 printui.dll,PrintUIEntry /ga /c\\computer /n\\print_server\printer

This adds a connection to print_server/printer for all users on a remote computer named computer.

The available options for rundll32 are shown in Figure 4.17

figure 4.17 rundll32 options
Enlarge figure

Figure 4.17 Rundll32 Options

PrnAdmin

The PrnAdmin utility lets you use scripts that perform administrative printer functions. You can create your own scripts or modify one of the sample scripts that is provided with PrnAdmin. Either way you can manage both local and remote printers using PrnAdmin.

This tool can perform the following functions:

  • Add or delete local or remote printers.
  • Add or delete printer connections.
  • Add or delete local or remote forms.
  • Add or delete ports on local or remote printers.
  • Add or delete printer drivers on local or remote printers.
  • Enumerate ports, drivers, printers, or forms on local or remote printers.
  • Pause, resume, or purge a local or remote printer.
  • Configure a local or remote printer.

note-icon

Note

To create scripts, you need to know a scripting language such as Microsoft® Visual Basic or JavaScript or be able to make use of the objects provided by PrnAdmin in any language that supports COM programming.

To install PrnAdmin, type the following command:

regsvr32 [Path]PrnAdmin.dll

To use the PrnAdmin sample scripts shown in Figure 4.18, type:

Cscript prnmgr.vbs

figure 4.18 prnadmin scripts
Enlarge figure

Figure 4.18 PrnAdmin Scripts

© 1985-2000 Microsoft Corporation. All rights reserved.



Microsoft Corporation Staff, IT Professional Staff - Microsoft Windows 2000 Server Operations Guide
Microsoft Corporation Staff, IT Professional Staff - Microsoft Windows 2000 Server Operations Guide
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 404

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net