Solved

Some client Printers can't print with DOS progs

Posted on 2000-03-07
24
602 Views
Last Modified: 2013-12-23
With a standard 5 station Win98 Peer to Peer netwk three workstations can be set up to print from DOS or Windows applications but two stations furthest from the server will only print from Windows programs. The program uses LPT1 and LPT2 as it's instruction to use the correct printer. The three stations which print ok do not have printers on LPT1 or LPT2 (except the server which is being shared). The two stations upstairs have local printers on them and the Program tries to use those printers (even though the same printer setup is used as appears downstairs) ie they try to use the shared printers of the server. Evidently the hard coded LPT1/LPT2 call in the Dos program is messing things up.
Anyone have any suggestions of how to fix this. The Dos program is a compiled clipper 5.3 code and we have the source.  
0
Comment
Question by:mrl
  • 7
  • 4
  • 3
  • +6
24 Comments
 
LVL 2

Expert Comment

by:jj_mako
ID: 2597042
can you drop down into dos and print something like your config.sys or autoexec.bat?

type autoexec.bat > lpt1

try that.
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 2598183
It depends on how hardcoded it is. If it is checking the DOS for where LPT1 is then there is a program that switches the LPT's for you. This can be run in the batchfile that runs the clipper program. I'll have to dig it up for you, we are talking ancient !  Then you can capture the lpt1 or lpt2 port in the same batch file, and find out which one prints to the server.  I hope this helps.
0
 

Author Comment

by:mrl
ID: 2598453
SysExpert...thanks for your reply.
I believe clipper works though DOS when it prints to LPT1 and LPT2. Maybe I misunderstood your comment but I'm not trying to switch LPT1 to LPT2, I am trying to print through Win98 shared network printers that reside on the server LPT1 and LPT2 ports. But what seems to be happening is if local printers are connected to LPT1 and/or LPT2 on the local PC (a workstation on a Win98 network)the program prints to the local printers rather than the network printers. I don't want that.
MRL
0
 

Author Comment

by:mrl
ID: 2598461
ii mako
Yes but they print to the local printers not the network printers.
0
 
LVL 2

Expert Comment

by:jj_mako
ID: 2598473
try writing a batch file that captures the lpt ports first then starts the dos program you want to print.

net use lpt1 \\computer\printer

have you tried that? what happens?  i know absolutely nothing about programing so i may be barking up the wrong tree.
what happens if you switch the local printer offline or even remove it and then try it?
0
 
LVL 7

Expert Comment

by:MATTCEI
ID: 2600443
Have you 'CAPTURE'd the server's ports on the workstation?

If so,what LPT numbers have you assigned to them at the workstation?

These should be other than 1 or 2,and the DOS program should be configured within itself to print to these 'other' port numbers.

If this isn't possible,you could do the reverse: assign the workstation's local ports to numbers other than 1 and 2.Some BIOSs will allow this.If not,they can be disabled in BIOS and replaced with an add-on parallel port card that does allow port assignment.
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 2601265
The point of the swaplpt program ( yes I'm still looking for it ) is that it swaps the ports at a very low dos level, normally, below what clipper uses. and thus you should be able to do the net use LPT1 or 2 for your network printer before running clipper, and hopefully it will print to the network rather than locally. I'll get back to you soon with the program. It is certainly worth a try. I know that it was used for similar purposes in the past.
0
 
LVL 1

Expert Comment

by:acheltenham
ID: 2605696
mr mrl sir .......i suggest that you recheck your paths to the printers and try ltp 3 and4 {virtual ports} for the systems with local printers thus ltp 3and 4 will be the sever printers ...... and i would like to know the programme that you are using so i can help you better
0
 
LVL 12

Expert Comment

by:Housenet
ID: 2607281
-Quick & simple test to first determine if it truly is the dos app is.. drop to dos prompt and type dir>LPT1 (or what ever definded captured port).. If it prints and does not from the clipper app then the printer setup in the app is s*rewed up.
0
 
LVL 3

Expert Comment

by:klover
ID: 2607437
Housenet, quit running through the NT and 95 sections answering questions like a point starved maniac.  It's not working for you, as evidenced by the fact that you've ANSWERED dozens of questions and only been graded on 5.  You just gave an answer that everyone in the thread already gave... and I've seen you do the same in other threads.  Your short, plagiarized, often cryptic answers show you are in it for points and not to help out the person asking the question.
0
 

Author Comment

by:mrl
ID: 2612088
acheltenham
I'm sorry I'm not understanding something. Please tell me exactly what I put in the server printer set-up and the workstation setups both one with and w/o printers attached. I have no experience with LPT3 or LPT4. As mensioned previously the application is a custome written Clipper 5.3 compiled system with hundreds of programs and to output to printers all we do is use a command SET PRINTER TO [lpt1 or lpt2}. Than use PRINT staments for each line.

ii macho
The server uses lpt1 and lpt2
I will try your idea of turning off the local printers. As far as I remember all workstation ports are captured to LPT1 LPT2. The ones without printers work fine and in Win98 all printers print fine, it's only in DOS those with printers attached print locally.
0
 
LVL 3

Expert Comment

by:apadua
ID: 2638307
Sorry, I beleive you're out of luck. The only solution to this will be if your bios allows you to set the local LPT address to something other than 378, IRQ 7. If then, have Win 95 redetect your hardware. Use your local printers as LPT 3 or 4, leaving 1 and 2 free. If you're using interface cards for your local LPT ports, jumpers may be the solution.

Good luck,


Andre
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 7

Expert Comment

by:MATTCEI
ID: 2639991
apadua - I agree.So much so that I said the same thing myself.A week ago.
At least you re-worded it.

Please read the previous posts first,and change this answer to a comment.


mrl -  "I'm sorry I'm not understanding something"

We're suggesting that you give each printer,be it remote or local,a unique LPT number.The workstations with no local printers attached should require no changes.
0
 
LVL 3

Expert Comment

by:apadua
ID: 2640007
apadua changed the proposed answer to a comment
0
 

Author Comment

by:mrl
ID: 2640590
I have changed the local printers to LPT3 and LPT4 and left the network printers connected to the server as LPT1 and LPT2. This just produced an error from the program (when run from the wkstn connected to the local printers)saying it couldn't find a printer. It is not possible to change the LPT number in the program (just for one wkstn...unless someone can tell me how the DOS program can obtain the wkstn name) so I can't see how this can work. I also turned the local printers off while they were configured as LPT1 and LPT2 and this produced the same error. I am unawear if the parallel ports are on the mother board or on separate cards. Is this problem unsolvable with the tools available to me?
0
 
LVL 3

Expert Comment

by:apadua
ID: 2641028
How did you go about doing that? Did you alter the hardware address, such as in the BIOS? You can't just set windows to use a different port name, you have to alter the hardware address. (Again, as I said, either with BIOS configurations or with jumpers).
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 2641127
You can get the workstation name from an environment variable. You will have to set the variable in each workstation seperately.
ie
Set Wname=comp1
from the autoexec.bat

I am still looking for a swaplpt prog, but I have searched my computers to no avail. Now I have to search my tape backups.
0
 

Author Comment

by:mrl
ID: 2641222
apadua
All I did was change the windows set-up. I'm a novice about this stuff so I missed your hint concerning the Bios address. Thanks for bearing with me on this. I will attempt to change the Bios if you can give straight forward instructions not just hints. Like exactly what address and IRQ should I use?

SysExpert
Thanks for your constant efforts. You are all just great.
0
 
LVL 3

Accepted Solution

by:
apadua earned 200 total points
ID: 2641332
Ok. The first thing you should do is go into your bios, get to the parallel port settings and disable it. Then go to windows, select (Start/Control Panels/System/Device Manager), and delete the LPT port, under the Ports and something.

Now you have no LPT ports.

Try mapping the LPT ports 1 and 2 (like you do with the machines that don't have a local printer), and printing from your dos app. It should work.

Also, you may wan't to send over the different options for your parallel port settings in your BIOS. As luck would have it, I only know the correct address for ports LPT1 and LPT2.

LPT1 is 378, IRQ 7
LPT2 is 278, IRQ 2

Anything different than that is GOOD. After you did the above test and it prints to the network printer OK, you want to set it to something different than those two. Then have Windows detect new hardware (with a similarly named control panel). Try configuring your local printers to whatever port Windows gives you.

Good luck, and keep posting as you go along so we can help.

Cheers,

Andre.
0
 
LVL 1

Expert Comment

by:acheltenham
ID: 2646194
sorry mrl for taking so long to respone
now let me see if i can explain what i meant
Lpt1 and Lpt 2 are your workstation local printer ports
and Lpt3 and lpt4 are the the peer server printer ports
now the setup you have upstairs cannot be the same as downstairs because the stations without the local printers will see lpt1 and 2 as the server printers and if you have the stations with the local printers setup the same way you will find that they will print to the local printers
now when adding the printes you should have selected the sever printers as LPT3 and 4 {this is for the stations with local printes}
i am trying my best to explain it for i does perform this setup all the time ...and please when changing your bios setting take note so you can change them back
0
 
LVL 7

Expert Comment

by:MATTCEI
ID: 2648999
This might be easier to fix than it appears,mrl.We've all been assuming that the workstations with local printers all have two printers attached to them (in addition to the remote server printers),but a re-read of your question shows this may not be the case.

Please confirm for us:

-How many local printers per workstation.

-How many remote printers per workstation.
0
 

Author Comment

by:mrl
ID: 2651512
Mattcei
We have a server with two printers attached to it on LPT1 and LPT2, two workstations with no printers attatched, one workstation with one local printer on LPT1 and one workstation with two printers attached on LPT1 and LPT2. I hope you are right about it not being a big problem.
0
 

Expert Comment

by:xpert040900
ID: 2698588
I have seen a similar problem.  DOS apps use lpt1 plain and simple.  Modify one of your printers; select details tab and click on add port and select other; call it LPT1.DOS.  Then click on capture printer port; select LPT1 and direct it to your UNC path.
Now try to print.  You may need to setup a batch file to connect and disconnect your printer though.  I believe there is also some third party software that will make this transparent to the user.

Hope this helps.

0
 

Author Comment

by:mrl
ID: 2771691
I'm finally clearing this question. I haven't solved it but it looks like the answers have stopped coming in. I chose the most details answer offering the most detailed help.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Enterprise networks where VoIP phones have been deployed frequently use port configurations that allow both a computer and an IP phone to be plugged into the same switch port but use different VLANs. On Cisco equipment I'm referring to the "native V…
Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now