Mapping a Network Printer to an LPT Port


These instructions apply to Windows 2000, but the process is similar with all flavors of Windows from Windows 95/NT4 and up. Novell users: this procedure must be used in addition to any Novell "capture" command you currently use.

To follow this procedure you will need to know your network printer's path and the driver used by your network printer. It would be a good idea if your network administrator followed this procedure for you!

This procedure must be followed on each workstation from which you need to print CompuVend reports.

1. Click "Start - Settings - Printers"

Click "Start - Settings - Printers"

2. Double-click the "Add Printer" icon.

Double - Click the "Add Printer" Icon

3. Click the "Next" button when the "Add Printer Wizard" window opens.

4. Click the "Local Printer" radio button and be sure the "Automatically detect and install my Plug and Play printer" box is NOT checked. Do not choose network printer on this window! Now click the "Next" button.

Click the "Local Printer" radio button


5. Click the "Use the following port" radio button, then choose a printer port. Be sure to choose a port where no printer is attached. Please note that your computer does not actually need to have this port installed. In this example, I chose to use LPT@: because I have a local printer attached to my computer's LPT1: port. Make sure you remember the name of the port then click the "Next" button.

Click the "Use the following port" radio button

6. Choose the correct driver for your printer. In this example, the network printer is an HP LaserJet 5si. You may need your Windows 2000 installation CD, or your printer's driver disk to proceed past this point. If in doubt, please consult your network administrator! Once the proper driver is selected, click the "Next" button.

hoose the correct driver for your printer

7. Depending on how you chose to select the driver in the previous step, you should see a message similar to the one below asking if you want to use an "existing" driver. If the network printer you're installing is already in use on your workstation, you probably already have the latest driver so you should choose to keep the existing driver. If this is the case, click the "Next" button.

click the "Next" button

8. Now you must give the printer a name. DO NOT give it the same name as the network print queue. Keep the name short because the program will not accept a printer with a name longer than 31 characters. You probably DO NOT want to use this printer as your default. Click the "Next" button.

Now you must give the printer a name

9. Be sure the "Do not share this printer" radio button is clicked. You do not want to share this printer because it is already shared on the network! Click the "Next" button.

10. Choose "No" when asked if you wish to print a test page. These are still additional steps needed before you can print. Click the "next" button.


11. The next window should be labeled "Completing the Add Printer Wizard." Check the settings. If all appear to be OK, click the "Finish" button. Otherwise click the "Back" button and fix you changes of click the "Cancel" button and start again.

If all appear to be OK, click the "Finish" button.

12. Now we must write a procedure that will "Capture" the printer port selected above and redirect output to your network printer. First, open "Notepad" (or "Wordpad"). To open "Notepad", click "Start - Run" then type in notepad.exe and click the "OK" button.

To open "Notepad", click "Start - Run"

then type in notepad.exe and click the "OK" button.

13. When the text editor opens, type the following text onto the very first line substituting the phrase "LPTx:" with the name of your LPT port, the phrase "SERVER_NAME" with the path to your network printer, and the phrase "PRINTER_NAME" with the name of your network printer. The back slashes (NOT the slash below the question mark) are required.

NET USE LPTx: \\SERVER_NAME\PRINTER_NAME

In my example, I chose to use printer port LPT2:, my network printer is located at and the printer name is KYO. You will have to consult your network administrator to see how to format this command. This is how the line looks in the example: Novell users: It may be possible to put your "Capture" statement in this file, too. Check with your administrator.

NET USE LPT2: \\KYO\HPLASERJET5SI

14. Press the "Enter" key at the end of the line, then save the file to your desktop with the name of Capture LPT Port.BAT. Be sure the file name ends in .BAT or the procedure will not run.. Sometimes Notepad insists on saving the file with an extension of .TXT. If this happens to you, consult your network administrator.

15. Now click "File - New" from Notepad's menu bar. Type the following text onto the first line and press the "Enter" key on time at the end of the line:
NET USE LPT2: /DELETE

16. Using the procedure outlined above, save this file to you desktop with the name of Resume Normal Use of LPT Port.BAT. Again, be sure the file name ends in .BAT and that you save it to your desktop for ease of access.

17. Now, each time before you start CompuVend, double-click on the icon labeled "Capture LPT Port.BAT". This will run a program that tells your computer to direct all output sent to the specified LPT port on to the network printer. Check with your network administrator to see if placing a shortcut to this batch file in your "Startup" folder is possible for your setup.

18. Make sure you've set up a printer that points to the correct LPT port in CompuVend under the Main Menu's "F8 - Preferences" printer definitions section.

19. After exiting CompuVend, you can double-click on the icon labeled "Resume Normal Use of LPT Port.BAT". This will free your printer port for normal use.


Please note these are Windows procedures NOT CompuVend procedures. They are required due to changes in the operating system.