Login Scripts
Working with Printers

If you have networked printers, then you probably have them shared from one of your servers. You can also use a login script to connect your users to these. This makes managing printers across a network very easy as users will be connected to the printers each time they login - even if they haven't used that machine before.

Connecting to Printers

There are two ways of connecting to printers.

DOS Command Utility

To make the connection to the printers via a login script requires a small resource kit utility to "con2prt.exe". This can also be found in the NT 4.0 Zero Administration Kit which you can download from here
You don't have to use the rest of the ZAK to get this utility and this utility works on Windows 2000 and higher as well as NT 4.0. 

To use, simply enter the command along with the switch /c to indicate that you actually want to connect to it along with the path to the printer.
For example to connect to a printer shared as hp-printer on server1 you would enter:

If you wanted this printer to be the default printer, then you would change the switch to /cd instead:

If you have multiple printers you should play around with the order they appear in the script so that the most common used is at the end.

Using the Native Mechanism

If you don't want to use another file to make the connection, you can also use the native mechanism, which was introduced with Windows 2000. To connect to the printer using the names above would mean the following command:

Disconnecting Printers

You can also use con2prt to disconnect network printers, although the command deletes all network connected printers. This is done with the command:

con2prt /f

If you are using the script to connect network printers, you might want to put this command at the top, so that the user account is reconnected to the printer each time. Any changes made to the central printer will then be passed across to the client machines at the next login.


Top of the Page - Home Page
Last Page Update: 28/03/2015

Copyright Sembee Ltd. 1998 - 2024.

Reproduction of any content on this web site is prohibited without express written consent. Use of this web site is subject to our terms and conditions.

All trademarks and registered trademarks are property of their respective owners. This site is not endorsed or recommended by any company or organisation mentioned within and is to provide guidance only and as such we cannot be held responsible for any consequences of following the advice given.

Sembee Ltd. is registered in England and Wales at 1 Carnegie Road, Newbury, Berkshire, RG14 5DJ.
Registered company number: 4704428. VAT Number GB 904 5603 43.

Server 1