Link to home
Start Free TrialLog in
Avatar of cjblair
cjblair

asked on

redirecting lpt ports

regarding an earlier question regarding redirection of parrallel ports...using ptrdr803.zip and spool2.zip (jrhelgeson answered-didn't get the grad in time--sorry)...after extracting, saving to disk, and installing to dos...the program worked temporarily under dos...my question is how do i utilize it permanently so it will hold the redirection...do i configure under autoexec?..and will it run the redirection under windows in dos programs that are ran?
Avatar of jrhelgeson
jrhelgeson
Flag of United States of America image

Howdy!

Let me look into it for ya.

Sorry we didn't get all your questions answered last time.  FYI, if you were to post an additional question to your old question I would still get notified that you added a comment to your question and I would be able to further assist you there.

I'll look into it, and have your answer for you hopefully soon.
Avatar of cjblair
cjblair

ASKER

thank you for your help...i look forward to the answer....
Actually,

Have you tried to capture the printer attached to LPT2, to LPT1 also from within windows?

To do this, go into:
Printers, then *right* click on your printer that is attached to LPT2,
Select Properties| Details and note what is says for "Print to the following port"

Select "Capture printer port", and Capture your LPT1 to the same network printer that LPT2 is captured to.

Try that, see if it works/helps.
Avatar of cjblair

ASKER

capturing the lpt2 to lpt1...unless i'm doing something wrong...won't allow me to do so unless i map it to the network path...windows 95 will not allow me to map a network path to my own self...is there another way....also i need to increase my points to 100 instead of 50...seems like this question is a toughy.....please keep my posted....appreciate your help.
I don't want you to use the spooling software as I have realized that it would just be a work around to capturing the ports properly.

Could you tell me what kind of network you are on?
Is it Windows95 (pier-to-pier), Novell, or Windows NT?
Where are the other 2 printers you are connecting to, and what kind of printers are they?

IE:
lpt2=HP LaserJet 5si -- Attached to Bob's computer
lpt3=Okidata ML 395 (Dot Matrix)  -- Attached to Cheryl's computer (file server, or whatever)

Thanks, and don't sweat the points my friend.

Joel
Avatar of cjblair

ASKER

the following info regarding the lpt port:

network:   win95 pier to pier
server has 3 ports:
lpt1=no printer is connected
lpt2=hp laser 4p--server
lpt3=deskjet 500--server

no problem for clients to print to server...server is the problem..dos programs will only default to lpt 1...need to redirect lpt to lpt2...lpt2 and lpt3 is required hookup for communication from the clients...mapped the clients to lpt2 and 3 (they have local lpt1..so i had to have them on lpt2 and lpt3 to work right with one of our major dos network programs)

thanks for your help
To hold the redirection even you start your computer, you need add a line in the autoexec.bat file with the same you write when start the redirection.

type
edit autoexec.bat
be carefuly you need add the line before some aplicartion start like win or some another.

@echo off
some lines
here you put your line
win

I hope this help you.
Avatar of cjblair

ASKER

what is the redirect command that you would put in the autoexec.bat in order to hold the redirect from lpt1 to lpt2?...thanks for your help...
He's refering to the ptrdr803 program.
However, I am currently viewing that as a "workaround" to the problem, and would like to try and capture the ports properly.

Could you respond to my previous post?
Exactly I refer to the ptdr803, and is necesary put this before some lines marked as REM by Windows Setup.

From windows 95 you only can redirect for net ports, not for local ports.
osi,
That's what cj needs to do, is to re-direct the network ports.

cj, the 2 printers you use -- Are they both network printers? (just to be sure)
Avatar of cjblair

ASKER

in response to osi and jrhelgesen....

i do have a network (win95 pier to pier) set up with myself being the server... the printers are local at my server station  with them being shared by the other clients...i don't have problem with clients printing to my station....the printers at my station (local) are as follows:

lpt1=open...
lpt2=hp laserjet 4p (local)
lpt3=hp deskjet 500 (local)

printing windows programs...no prob.....printing dos prog...i get the error message...will not redirect....need command in auotexec.bat to redirect local port.......

thanks for the help....i look forward to your answer.
CJ try with this at the command prompt

mode lpt1:=lpt2

I'm not sure but i think this command redirect your lpt1 to lpt2

in another way, do you can redirect the printer port with the ptdr803?

exactly what you type to redirect the port?

I hope can help you!
Place this in the Autoexec.bat file & there you go!

c:\%program location%\prindir /x
c:\%program location%\prinmod /lpt3

reject the current answer so I can post this as the answer.



Avatar of cjblair

ASKER

osi...regarding mode lpt1:=lpt2....

i tried at the command prompt-holds if you enter dos program thru dos..holds temporarily...tried to add it in autoexec.bat....still error message....

jrhelgeson...regarding above command in autoexec.bat...i typed it just like you said (both lines) in the autoexec.bat...rebooted the computr...tried program...still error...

i need a redirect in autoexe.bat to hold so when i run the dos program in the windows at any time...it will redirect....

did i do something or type something wrong...thanks for the info....let me know what you think....thanks again....
Forgive me for asking this, but

Did you enter in the program path in place of where I typed %program path%?

Example:  If you copied the files (prindir.exe, etc..) into a directory called PRINTER, the command would read:
C:\PRINTER\prindir /x
C:\PRINTER\prinmod /lpt3
PAUSE

(enter the pause command to stop the computer from booting, so you can see if the devices loaded properly.)

You may need to press the ESCape key as soon as you see the Starting Windows 95 banner screen in order for you to see the results given from the autoexec.bat.

You can also create a batch file that loads your program.
Just create a text file and call it RUN.BAT or something,  In it, place the two commands for the print redirection, and the third line, put the name of the program you are loading.
Here's an example using quicken for dos.

**Contents of run.bat**
@echo off
C:\PRINTER\prindir /x
C:\PRINTER\prinmod /lpt3
C:\QUICKEN\quicken.exe

** End of File **

Then all you would need to do is have the shortcut in windows load the batch file, instead of having it run "quicken.exe"


Avatar of cjblair

ASKER

jrhelgeson....

yes....i entered the the %program path....i'm pretty green when it comes to this....i'm learning as i go...no formal training...so i need all the help i can get....

so...would this be the correct wording to put in the autoexec.bat to get it to redirect evertime i run dos program thru windows?..regardless of the dos program?...thanks for help...i increased the pts to 100.....thanks cj
Please -Reject- the current answer.
Could you reject the current answer by grading it with an "F" which will open the question back up so I could answer it, and get the points.

At which point you can grade my answer, which will award the points to me.

If you need help, you can read "Help on Grading quesitons"

Thank You, and I am glad I could help you solve your problems.

Joel R. Helgeson
Avatar of cjblair

ASKER

still getting error on lpt1..even when i put the redirect in the autoexec.bat...this is exactly what how i wrote it:

C:\PRINTER\prindir /x
C:\PRINTER\prinmod /lpt2
ASKER CERTIFIED SOLUTION
Avatar of jrhelgeson
jrhelgeson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cjblair

ASKER

the problem was that it was that if it redirected it went to lpt3...what i needed is the redirect to lpt2....are you trying to create a batch file in the autoexec.bat...and what would that be...again i'm pretty green with this so your help is appreciated...cj
OK, ooops...

Have you tried creating the batch file?