Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Redirecting lpt1 to tcp/ip printer
Message
From
06/11/2006 13:45:50
 
 
To
06/11/2006 12:44:52
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Environment versions
Visual FoxPro:
FoxPro Dos
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01167360
Message ID:
01167395
Views:
12
>I have an ancient FPDOS app where I do not have access to the source code. The program prints to lpt1. Can I redirect the output to a shared tcp/ip printer on my windows network?
>
>I'm trying NET USE LPT1: ?? but have no idea what ??? should be. The printer name (i guess mapped to it's ip is FPAD1)

There are a couple of possibilities of how print jobs may be sent to the TCP/IP printer:
Workstation --> Printer's built-in print server
Workstation --> Windows print queue (usually on the server) --> Printer's built-in print server
Although it's possible to print directly to the printer via the first option, many networks are configured using the second option. This is because most built-in print servers have limited buffer space. Putting a Windows print queue in the middle makes the buffer essentially unlimited, and simplifies life for the printer's built-in print server because it's being fed from only one source (the Windows print queue) rather than multiple workstations.

If it is configured via option 2, you need to know the Windows server name and the shared printer (i.e. print queue) name. You can determine these by looking at the installed printers on the server console. You would then issue
NET USE LPT1: \\ServerName\SharedPrinterName /persistent:y
If there is no intermediate Windows print queue, you need to know the IP address of the TCP/IP printer and the printer's port name. For simple print servers with only one port that is usually P1. For more complex devices you may need to go into the Web or JetDirect configuration software used to set up the print server so you can determine the port name.

Once you have that information, you then need to run the Add Printer wizard and install a new LOCAL printer (NOT network printer). When asked for the port, you create a new TCP/IP port. You then go through the Add TCP/IP Printer Port wizard, filling in the IP address and port name. Essentially, you are connecting via this newly created TCP/IP port rather than LPT1:.

After you've finished the Add Printer wizard, you've effectively got a local print queue that can print to that printer. To get a DOS app to print to it, you now have to share the local printer - make it shareable, giving it a share name. You would then issue
NET USE LPT1: \\YourWorkstationName\NewSharedPrinterName /persistent:y
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform