Redirect LPT port to a TCP/IP Printer WITHOUT having to share the printer

We (unfortunately) still use a DOS program that will of course only print to a LPT port, but we only have TCP/IP printers on the network.  I need to redirect any print job sent to LPT1 to a specific printer's IP address.

I am aware of the

NET USE LPT1 \\servername\sharedprinter /PERSISTENT:YES

method to redirect, but cannot share the printers.  I have found some third party software that accomplishes what I need to do, but it is much too expensive and I need to find an alternate method.

I have searched here & google but cannot find a solution other than what I worte above.  Anyone have a suggestion?

MAX
LVL 1
MaxwellTurnerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sirbountyCommented:
Not sure - and no current way to test, but does this work:

net use lpt1: 10.1.2.3
or
net use lpt1: \\10.1.2.3
Steve KnightIT ConsultancyCommented:
No that won't work unless the printer is a netbios device itself... some printers will do that, my OKI will advertise itself so you can get to it with \\printername.

If that is the case you should be able to re-direct it to the printer with a normal net use command like

net use lpt1: \\10.1.1.1\lpt1
or
net use lpt1: \\10.1.1.1\lp

Try start | run \\ipaddress

to see if it does support that or look in the printer's web or telnet front end for being able to configure netbios access.

If your DOS app can change port name try printing to c:\spool say then have a batch file which does

lpr -s ipaddress -p raw -ol c:\spool

to send the spool file to the printer.

Why you can't use shares?

Steve


Steve
pgm554Commented:
What type if printserver card?
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

MaxwellTurnerAuthor Commented:
The printers have HP Jet Direct cards.

I tried:

net use lpt1: \\10.1.1.1\lpt1
or
net use lpt1: \\10.1.1.1\lp

and I get "System error 67 has occurred.  The network name cannot be found."

I might be a little confused with respect to printer sharing . . . . maybe someone can clear this up for me.

We used to have one PC connected with a parallel cable (LPT1) and then we shared that printer on that PC.  As I understand it, all print jobs going to that printer were routed through that PC to the shared printer - this is what I want to avoid.  Now however, the printer is only connected via TCP/IP (IP ADDRESS).  If I share the printer on a PC in this case, do all print jobs get routed through that PC or am I just sharing the Jet Direct card?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Steve KnightIT ConsultancyCommented:
pgm554's links covers this I think but to answer your question if you install the printer on a computer then share it no-one has to connect to it, other workstations will carry on printing directly to the printer as you'd expect.

Try looking at  http://10.1.1.1  or whatever your printer is and look in the Administration part -- if you tell us which printer or jetdirect it is we can see if it supports netbios.

Take a look under the Administration area and look for protocols / conffiguration.  You will see tcpip / ipx/spx / appletalk etc. You should probably only need tcpip enabled abd if it shows it netbios. Then you can do a net use command to the printer like above.

Other than that share the printer, then use net use lpt1: \\yourcomputer\printername /persistent:yes and try sending something to lpt1:

Steve
MaxwellTurnerAuthor Commented:
Thanks for all the input.  I feel a little stupid now because I have everything working great and the solution was quite simple in the end . . . this isn't my regular job in my defense:).  In hind sight, perhaps I should have mentioned that we have a Novell server on our network as well...and each PC has a Novell client installed.
I have a spare PC so I decided to fire it up and use it as a printer server.  I installed the required printers & shared them . . . I'm not sure why I didn't think of this earlier??  It turns out that Novell has a "Capture a printer port" feature . . . on each Novell client I needed to redirect, I simply browsed to the shared TCP/IP printer on the network, assigned it to LPT1 & captured it - works very nice.

I'll split the points between you - The link from pgm554 was what turned the light bulb for me when I saw the phrase "Capture Printer Port" - I remembered seeing that on a Novell menu before - so I gotta give the answer to you.

Max
sirbountyCommented:
Glad you got it sorted.
Steve KnightIT ConsultancyCommented:
Thanks too... tend to forget people still use NetWare.  The commandline
way of doing that is capture.exe btw though you can still do net use too.

If the printer is configured so it is a printer shared through your
netware server already then no need for your spare w/s with shares on -
you can just capture lpt1 straight to the server.

Anywayat least you are working, thanks for share of the points

Steve
pgm554Commented:
As somebody that likes Novell and only tolerates M$,I would have normally said something like,if you used Netware,you wouldn't have this problem and sure enough,the first time I don't mention Netware...
MaxwellTurnerAuthor Commented:
That too funny pgm554!  I don't know much about Netware, but I'm learning - very stable platform.  Hey dragon-it, is it an easy thing to explain how to "share a printer through a Netware server"?  This is what I wanted to do in the first place, but could not figure out how to do that.

Max
Steve KnightIT ConsultancyCommented:
What netware version are we talking here... if it's 3 or 4 it needs a specifically netware aware print server.  If it's 5 or 6 things could be said tob a BIT easier... not as easy as doing it from windows mind... it involves creating a printer, print server, and print queue in NDS using Console1 or nwadmin or setting it up through ndps, different again in 6 I think.  I rarely use netware now though I am a CNE5 and cut my networking teeth on NetWare 3 and 4.  Might be worth a post here where no doubt people are doing this more often than me:
http://www.experts-exchange.com/Networking/Novell_Netware/






MaxwellTurnerAuthor Commented:
Sorry, I was away for a few days.  Thanks Dragon-it, e have v6 and I can use nwadmin to do this.  I have been trying a few things and with abit of tweaking, I should be able to figure this out.  Thanks for all your help.

Max
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.