Page 1 of 1
Problems printing with DOS program using "net use lpt1"
Posted: 21 Jan 2015 22:26
by needbatchhelp
I have a program called Books that runs in DOS on my windows XP system. It prints from my network printer instead of my USB printer. I tried the "Net use lpt1...." thing and it tells me "local device name already in use" and error 85and still prints to the network printer
So the bat file is where I put the net use lpt1. I actually changed "Gina" which is the computer name to the name the computer uses on the network, forgot to take a new pic. And "printer" is the shared name for the printer. Any idea on how to fix this?
Also, what does all the other stuff mean below the "net use" line?
https://imgur.com/a/IScom
Re: Problems printing with DOS program using "net use lpt1"
Posted: 22 Jan 2015 02:14
by foxidrive
needbatchhelp wrote:I have a program called Books that runs in DOS on my windows XP system. It prints from my network printer instead of my USB printer. I tried the "Net use lpt1...." thing and it tells me "local device name already in use" and error 85and still prints to the network printer
"local device name already in use" indicates that there is already a LPT1 it looks like.
So the bat file is where I put the net use lpt1. I actually changed "Gina" which is the computer name to the name the computer uses on the network, forgot to take a new pic. And "printer" is the shared name for the printer. Any idea on how to fix this?
Also, what does all the other stuff mean below the "net use" line?
https://imgur.com/a/IScom
Stuff below which net use line? You're showing two.
Be specific in your question please.
Re: Problems printing with DOS program using "net use lpt1"
Posted: 22 Jan 2015 02:42
by needbatchhelp
How would I go about fixing the problem? Would changing it to LPT2 or LPT3 in the bat file fix the issue?
I forgot to mention that I am the admin user if that makes a difference.
Re: Problems printing with DOS program using "net use lpt1"
Posted: 22 Jan 2015 03:18
by ShadowThief
Try deleting the port with
before running the script.
Re: Problems printing with DOS program using "net use lpt1"
Posted: 22 Jan 2015 03:28
by ShadowThief
And as for what everything else does...
Code: Select all
:: Prevent the commands from being displayed on the command prompt as they are being run
@echo off
:: Go to the D:\BOOKS directory. This could also have been achieved with the command cd /d D:\BOOKS
D:
CD \BOOKS
:: Run FOXR.exe with the options BL and -T. I have no idea what this does. Google is telling me that foxr.exe is FoxPro, but that isn't how you use the B or L flags.
FOXR BL -T
:: Goes to D:\
CD \
:: Outputs either a ÿ or a space, depending on your code page. Honestly, there's probably no reason for this line.
ECHO ÿ
Re: Problems printing with DOS program using "net use lpt1"
Posted: 22 Jan 2015 06:02
by Squashman
I am wondering why you took a picture of the screen when doing a screenshot or just copying and pasti g from the programs would have been a lot easier for everyone.
Re: Problems printing with DOS program using "net use lpt1"
Posted: 22 Jan 2015 12:06
by needbatchhelp
Do I just open cmd window and put in the delete code? Or should I put it as the first line of the bat file?
If I do it with a cmd window, do I have to do this everytime I turn on the computer? Or is there a way to do it automatically?
ShadowThief wrote:Try deleting the port with
before running the script.
Re: Problems printing with DOS program using "net use lpt1"
Posted: 22 Jan 2015 18:14
by ShadowThief
Well, first I would try out the command to see if it even works. Just put the code in a command prompt.
And then if it does fix the problem, I would reboot and see if the problem comes back.
- If the problem is initially fixed but comes back after the reboot, you need to add the line to the top of the batch file.
- If the problem is initially fixed and does not come back after the reboot, don't worry about it.
Re: Problems printing with DOS program using "net use lpt1"
Posted: 05 Feb 2015 09:18
by Davide Guolo