How to Use Con2prt.exe to Connect to a Network Printer

Last reviewed: February 24, 1998
Article ID: Q181663
The information in this article applies to:
  • Microsoft Zero Administration Kit for Windows NT Workstation 4.0

SUMMARY

This article describes how to use the Con2prt.exe tool included with the Zero Administration Kit for Windows NT 4.0 (ZAK) to connect to a network printer. You are not required to install ZAK to use the Con2prt.exe tool.

MORE INFORMATION

The Con2prt.exe tool is a command-line utility for adding or removing network printers on Windows NT-based computers. You can use the Con2prt.exe tool in a Windows NT login script or in conjunction with an unattended setup of Windows NT. To install a network printer with the Con2prt.exe tool, use the appropriate method.

Run the Con2prt.exe Tool from a Login Script

Use the Con2prt.exe tool to connect to a network printer in a Windows NT login script. To do so, follow these steps:

  1. Copy the Con2prt.exe tool to the %SystemRoot% folder of the Windows NT-based client computer.

  2. Configure your Windows NT login script to run the Con2prt.exe tool.

NOTE: You can display the command-line switches for the Con2prt.exe tool by typing "con2prt /?" or "con2prt /h" (without quotation marks).

Run the Con2prt.exe Tool from a Batch File on the Distribution Share

Use a batch file located in the $$ folder of your Windows NT Setup distribution share to run the Con2prt.exe tool. You can automate the installation of the batch file with the tools used for an unattended installation of Windows NT. To do so, follow these steps:

  1. Copy the Con2prt.exe file to the $$ folder that is located in the $OEM$ folder of your Windows NT Setup distribution share.

  2. Create a batch file in the $$ folder that runs the Con2prt.exe tool.

    NOTE: Files located in the $$ folder of the distribution share are copied to the %SystemRoot% folder of the Windows NT-based client computer during Windows NT Setup.

  3. Confirm that your Unattend.txt file contains the following entry in the [unattended] section:

          OEMPreInstall = yes
    

  4. Configure your Cmdlines.txt file to run a registry file that places the command to run your batch file in the Run key of the registry on the Windows NT-based client computer.

    NOTE: You cannot run the Con2prt.exe tool directly from the Cmdlines.txt file.

For additional information about configuring the distribution share and unattended setup parameters for Windows NT, see the Automating Windows NT Setup Deployment Guide, available for download from the following Microsoft Web site:

   http://www.microsoft.com/ntworkstation/info/deployguide.htm


Additional query words: deploy logon
Keywords : ntsetup NTSrvWkst ntutil
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 24, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.