Question about Printers & Copiers

2 Answers

Dos Program in FoxPro

Dos is already set on port LPT1 when we give command DIR < PRN it print whole directory. But port is change to LPT3 due to hardware problem.

How I can change default port to LPT3 when computer starts.

I will be thankfull to you if you solove my problem

ManMohan Sharma

Posted by on

  • Manu_76 Mar 13, 2008

    Window XP is running on this computer I have develop a software in Foxpro 2.6 (Dos) It was working fine when port was LPT1 but now Port is LPT3 and software is not giving printing. I have to put everywhere when print LPT3 in my software. I have used Net Used also but is not solove my problem. I was thing some command like MODE to redirect printing in DOS but is only redirect printing from LPTn[:] to COMn[:] only. Some other solution plz.


    ManMohan Sharma


2 Answers

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 2 Answers

To answer the question, I need to k**w if your DOS session is running inside Windows. As this is the most likely scenario, I'll answer assuming that - the answer will be different for DOS only systems.

Has the faulty LPT1 port has actually been removed? If it has, why **t just alter the port number of LPT3 back to LPT1 ? This can be done with jumpers on an old style card, or from device manager inside Windows if plug and play. If **t, you can try the following:

1: If the printer is already installed in Windows on LPT3, skip to step 3:
2: Install the printer in Windows. If you don't have a suitable driver for it, you can use Generic/Text only driver.
3: Right click on the printer, go to sharing, and make the printer shareable. Use a share name of 11 or less characters and ** spaces - e.g. EPSONLX500
4: From the CMD prompt, type the command:

net use lpt1: \\%computername%\Sharename


net use lpt1: \\%computername%\EPSONLX500

**te that you do **t need to replace %computername% with your exact computer name - the machine will do it for you.

Finally, for others reading this, you can also use this technique to print from DOS to most "intelligent" USB printers (Hi end Laser, Dot Matrix etc). It probably won't work with "dumb" GDI printers or All-in-ones where Windows has to do all the work. If the printer supports PCL or ESCP printing languages, you are probably going to be OK.

Posted on Mar 10, 2008

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer


i have running prblem foxpro xp in window xp high Efficient Spreadsheet Designs
\r\nSpeeding Up Slow Macros
\r\nSpeed up VBA By Turning Off/On Calculations
\r\nMS Excel: Improving Performance\", \"style=\\"background: #FFFFFF;padding: 2px;font-size: 10px;width: 550px;\\"\");" onmouseout="GAL_hidepopup();" rel='nofollow' href="">speed computer VBA ERRORS
Handling Run-time Errors
\r\nSub Stop_All_Errors()
\r\nOn Error Resume Next
\r\nOn Error GoTo 0 'Resets error trapping
\r\nEnd Sub
\r\nSub Custom_Error_Message()
\r\nOn Error GoTo MyCstmErr
\r\nExit Sub
\r\nMyCstmErr: Msgbox \"My Custom Error Message\"
\r\nEnd Sub
\r\nSub Stop_Warning_Alerts()
\r\n 'Your code here! Example might be ActiveSheet.Delete
\r\nEnd Sub
\r\nAlso see Excel VBA Runtime Errors & Preventing Them
\r\nExcel Formula Errors & How To Deal With Them
\r\nISERR Function: For any error type except #N/A.
\r\nISERROR Function: For any error type.
\r\nISNA Function: For the #N/A error type.
\r\nError.Type Function: For specifying error types. #NULL! = 1 #DIV/0! 2 #VALUE! 3 #REF! 4 #NAME? 5 #NUM! 6 #N/A 7
\r\nE.g =IF(ISERROR(VLOOKUP(Arguments)),0,VLOOKUP(Arguments))
\r\nSee Efficient Spreadsheet Designs for better ways.", "style=\"background: #FFFFFF;padding: 2px;font-size: 10px;width: 550px;\"");" onmouseout="GAL_hidepopup();" rel='nofollow' href="">error sows up devide zero overflow error

ERROR- Devide Zero or Overflow Error

How to resolve this issue


Posted on Apr 08, 2008

Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

1 Answer

My printer dont print


The first thing to check is the cable replace and try to print. If still the printer does not respond then you can check to make sure the port on your computer is working. If you are connecting to a USB port then try to use a pen drive etc., to make sure its working. If connected to LPT then try to go to DOS mode in the Command prompt try to give the command as C:> DIR>LPT1 this should print a list of files on the root directory of C: if this is printed then the problem may be with your application.

Try to make sure of the printer is set to be used as off-line or Pause printing.

Jul 17, 2011 | Epson LQ 680 Matrix Printer

2 Answers


The problem is, the DOS program tries to print to LPT1, which is your parallel port. We need to redirect this to your USB Port. First, you have to set up printer sharing: Go to Control Panel | Printers | Your printer and share the printer. Assuming that you share it with the share name "MYPRINTER" and the computer is called "MYCOMPUTER", then type go to Start | Run and type in: NET USE LPT1: \\MYCOMPUTER\MYPRINTER /PERSISTENT:YES That should do the trick, unless there's a driver problem, which is unlikely for a dot matrix printer. If that doesn't work, let me know and I can troubleshoot further.

Sep 09, 2007 | Panasonic KX-P2130 Matrix Printer

1 Answer

My Epson LQ300+II printer does not print via USB from XP SP3 - DG31PR Intel Mbd. Someone pls urgent help pls...

Solution 1

Purchase an LPT printer port (PCI Slot), get it fixed on your motherboard. And follow the steps :

- install the PCI slot driver
- Goto Device manager, select properties for PCI Slot. there you need to change printer port from LPT3 to LPT1
- Goto to printer driver properties and there also you need to change printer slot from LPT3 to LPT1

Solution 2

1) Install the Microsoft Loopback Adapter
a) In Control Panel, double click on Add Hardware.
b) Click Next
c) When the scan finishes, select "Yes, I have already connected the hardware"
d) Click Next
e) Scroll to the bottom of the list and select "Add a new hardware device"
Click Next
f) Select "Install the hardware that I manually select from a list (Advanced)"
g) Click Next
h) Select "Network Adapters"
i) Click Next
j) Select "Microsoft" under the Manufacturer list.
k) Select "Microsoft Loopback Adapter" in the Network Adapter list.
l) Click Next
m) Click Next
n) Click Finish

2) Configure the Adapter
a) The loopback adapter is a virtual network adapter and can be configured the same as a regular network card.
b) Set the adapter to have a static IP address such as

3) Share the printer.
a) I recommend you use a share name that you will remember. I used “Printer” in the new machines that are already deployed.

4) Capture the printer port.
a) NET USE LPT1: \\[Computer Name]\Printer /PERSISTENT:YES

Mar 20, 2010 | Epson Dot Matrix LQ-300+II Printer

1 Answer

Zebra TLC2844 wont print at all

Try to make the self-test first:
Power OFF
Press "FEED" and keep it pressed and turn the power ON again.
Did it print?! if Yes... There must be a cable problem or port.
Is it USB? Serial? Parallel ?
Let's say it's Parallel, go to the command line and type:
"dir >lpt1"
without the quotes and assuming it's connected to 1st parallel port
did it print?!
on serial would be "dir >com1"
or, if it shows up in "Printers", pre-define it and just type: "dir >prn"
Still doesn't work!?
Try with a different cable, or other computer.
You can use it even without installing the drivers...

Sep 14, 2009 | Zebra Eltron TLP 2844 Thermal Label...

1 Answer

Dos command print in USB printer

Try this.
You can share the printer and then run a command like:
net use lpt1: \\servername\printername

I think you can go one step further even and add /persistent to the end to make it more permenant.

This will allow your program to send a print job to lpt1.

If you need further explanation of this let me know.
Good Luck

Mar 20, 2009 | Printers & Copiers

6 Answers

Not printing in foxpro 2.6 dos to hp laser jet 1020

You write "type the above line at command prompt". I dont't know Where exactly to write? Can you tell me!

Feb 05, 2009 | HP PSC 1610 All-In-One InkJet Printer

1 Answer

Foxpro dos programme not printingin usb printer laserjet cp1515

You can access your printer connected to USB port with loop back configuration and print from DOS.
Not only that, you can also print to a printer on the network

Net use lpt1: \\Comp name\ printer name /persisten:yes

Dec 31, 2008 | HP PSC 1610 All-In-One InkJet Printer

2 Answers

How to redirect lpt print to canon lbp-3000 printer

Here's what you need to do. ON the computer that you want to associate that LPT1 port, you need to know the name of the computer, and the share name of the printer. In this case, I am assuming you have the Canon LBP-3000 physically connected to this system running the FoxPro program.

Step one: Find the computer name. Click on START SETTINGS CONTROL PANEL. Double click SYSTEM. Click on the tab COMPUTER NAME and under FULL COMPUTER NAME, write down the name. Click OK to exit the window.
Step two: Click on START, SETTINGS CONTROL PANEL. Double click PRINTERS AND FAXES. Right click on the Canon LBP-3000 printer and click on SHARE. In the window that opens, click on SHARE THIS PRINTER and take note of the name in SHARE NAME: and write it down. Click on OK to share the printer and exit out of the wizard.
Step three: Click on START, RUN. Type CMD in the box and click OK. in the black window, type NET USE LPT1 \\COMPUTER NAME\SHARE NAME

Follow with RETURN or ENTER and you should be good.


Aug 04, 2008 | Canon LASER SHOT LBP-3000 Printer

2 Answers

Printing from Dos Prompt

1. Save your text file (.txt).

2. On the command prompt navigate to that directory

3.Type "Lpr -S -P lp text.txt"

Substitute for your copier's ip

Substitute text.txt to filename.


Or you can: to print from MS-DOS apps.

1. Share the printer on a networked windows computer. Make sure you make the name MS-DOS compatible.

2. At a DOS prompt, type the following command:
"net use lpt1: \\servername\printer_share/persistent:yes"

NOTE Servername=computer name

printer_share=printers share name


Sep 28, 2007 | Printers & Copiers

Not finding what you are looking for?
Printers & Copiers Logo

Related Topics:

872 people viewed this question

Ask a Question

Usually answered in minutes!

Top Printers & Copiers Experts


Level 3 Expert

96576 Answers

old marine
old marine

Level 3 Expert

1472 Answers

Donald DCruz
Donald DCruz

Level 3 Expert

17129 Answers

Are you a Printer and Copier Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides