Connecting to Printers - 27 Aug 2003

In Scripting Solutions: "Connecting to Printers" (August 2002,, InstantDoc ID 25652), Christa Anderson explains how to use the WshNetwork (aka WScript.Network) object to direct users to the right printer. I have a better solution that doesn't require much scripting. My solution requires Windows 2000 Professional and the Microsoft Windows 2000 Server Resource Kit's robocopy.exe and con2prt.exe tools.

First, create a centralized directory called \\servername\share\all users\printers. Within the printers subdirectory, create as many folders as you want (e.g., ...\all users\printers\1st Floor\Dept A, ...\all users\printers\1st Floor\Dept B, ...\all users\printers\2nd Floor\Dept C, ...\all users\printers\2nd Floor\Dept D). Suppose you have two printers in 1st Floor\Dept A. You need to create two shortcuts that contain the path \\servername\share\con2prt.exe /cd \\printserver\sharename, and you need to give each shortcut a meaningful name (e.g., HP_XXX at Alice Place, HP_YYY at Bob Place).

Create both shortcuts for every printer on each floor. As you add or remove printers on different floors or in different departments, you can simply create the necessary folders and shortcuts under the \\servername\share\all users\
printers subdirectory.

To publish the printers folders to users who need to use the printers, add the following command to your logon script

robocopy "\\servername\shareall users\printers\" "C:Documents and Settings\All 
Users\Start Menu\Printers" /mir

When a user logs on for the first time after this change, the printers appear in the user's local profile. The user can then choose any printer. For subsequent logons, the copy and download processes are abbreviated because Robocopy downloads only the source directory changes.

This solution lets users select any printer, even on a different floor or in another department. In addition, network performance doesn't suffer each time a user logs on in the morning. The benefits are that administrators can easily maintain printer setup from a centralized folder, and the solution requires only minimal scripting. For more information about Robocopy and Con2prt, see the resource kit documentation.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.