Solved

Can't print from dos

Posted on 2012-04-11
6
455 Views
Last Modified: 2012-06-22
We have network with 2008R2 server, and are still using an old dos program that we must print from. By using the net use command we have been printing fine to a Microline dot matrix and two Brother 1440's although the 1440's had to had to be routed through an XP workstation because server 2008 doesn't support them. We recently upgraded one printer to an HP laserjet which is supported.

What changed is that I took the newer printer off the workstation and connected to the server via USB and shared from there. It installed fine, and I re-installed it on the workstations and set it up with the net use command. Prior to moving it, the other workstations were able to print to it from the dos program. All workstations are running XP pro, 32 bit, the server is 64 bit.

HP recommended newest drivers and an installation sequence, which I followed, for mixed 32 - 64 bit environments.

We can print to it from any Windows program on any workstation. However, only one workstation will print to it out of dos using the net use command, the others are not connecting from dos, although they are configured the same, as near as I can tell. I'm missing something.

I've compared the workstation configurations in the dos program. I even used the logon that works, to try to print on different machines, but it only prints from the one machine, so it appears to be specific to the machine and not the program.

I did notice that the printing machine has the older dotnet 1.1 installed and another doesn't. Maybe dos printing requires the older dotnet??

I can use a dos print command to print from any workstation, but I think that is still just a Windows function. (print /d:\\printserver\printer c:\path\file)

I'm not finding any answers at MS support. Any dos gurus out there?

Dennis
0
Comment
Question by:FarpointC
  • 3
  • 2
6 Comments
 
LVL 26

Expert Comment

by:pony10us
ID: 37835277
Are you printing ASCII (text) files?  If so then I would try this:

wordpad /pt <filename> <printername>
0
 
LVL 8

Accepted Solution

by:
JT92677 earned 500 total points
ID: 37838303
Dennis,

How was it setup with the NET USE command? Did you try to direct the printer directly to the print switch, or printer, or did you go through a shared printer on one of the network computers?

A way to check:

When you get into the CMD: prompt, and type  NET USE

What is the response?

I have a BAT file I run once at startup on each computer that needs to print to LPT1: from DOS (old programs,  you're right) and they all work, even through a multi-port print server.

I'd be inclined to think this is NOT a driver issue, it's a redirection issue.

On my system, NET USE redirects LPT1: to a computer with a shared printer name (even though the printer is not directly connected to that computer, the key is to share the printer on some computer, and setup the NET USE LPT1: to point to that computer with that shared printer name.

I run through a print server, and then setup LPT2: to go directly to another network printer, and old DOS programs (they are still useful at times) print to LPT1 or LPT2 with no problems. But the NET USE has to be correct.

Jeff
0
 

Author Comment

by:FarpointC
ID: 37839516
I agree that it must be a redirection issue, rather than a driver issue. I'll try your suggestion.
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 8

Expert Comment

by:JT92677
ID: 37839784
FairpointC - I had an e-mail prepared for someone else with a similar issue (not on EE) and edited it a bit
to post here. It assumes you haven't tried NET USE, pardon that part, but take a look at the entire solution:

This may seem like an odd suggestion, but it works.

The goal is to assign LPT1: to your DOS printer, and print to LPT1:

Here's a sample command in a BAT file that you can run every time
you reboot your windows computer:

NET USE LPT1: \\DAVE-1\NETLPT

1. In this example, the computer is named DAVE-1
2. The printer share name is "NETLPT"

The shared printer can be on the local computer, and while it seems odd to have a network share on a local computer to be used by the local computer, this works. But it also works for other computers on your network that want to print to your shared DOS printer.

You can do some testing once the Computer name and Share name is known:

Get to the CMD: prompt

Type  "NET USE" to see what's already setup
Then try "NET USE LPT1: [computer name offering up the shared printer]\[the share name]

e.g
NET USE LPT1: JTWINXP\SAMSUNG1  
where my computer is JTWINXP and the printer is shared as "SAMSUNG1"


Then type "NET USE" to check that the assignment of LPT1: is going to the network printer.
Then try doing a directory to the printer, e.g.
DIR/W > LPT1:

To disconnect the share, use  NET USE LPT1: /D
But I don't disconnect it, once it's assigned this way, it just works.

This works, I've used it, and have setup other systems that need to print from DOS to a
printer compatible with DOS type printout, most seem to honor EPSON printer codes.

Jeff

PS: The printer does not need to be physically connected to any system, it can be a network printer, or a printer connected to a print server, as long as a machine can use it, it can share it.
0
 

Author Comment

by:FarpointC
ID: 37870779
Actually the net use command has a persistent switch which I use to keep the connection alive through reboots.

The answer was that I was running the command prompt as the administrator, which is required on many settings changes on a domain, but not this one. It mapped the printer on the administrator account. I had to run the command prompt from the local user account and it mapped the printer just fine. I found out through through the suggestion by JT92677, thanks Jeff. I didn't know you could review mappings with that command.
0
 
LVL 8

Expert Comment

by:JT92677
ID: 37871392
I don't use the persistent switch it isn't necessary if the assignment is done with a bat or cmd file.  Also you can distribute the bat file for anyone who needs dos printing without having to assign the mapping at each workstation that may or may not need dos print support.

Glad something I suggested worked.

Jeff
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Transparency shows that a company is the kind of business that it wants people to think it is.
Outsource Your Fax Infrastructure to the Cloud (And come out looking like an IT Hero!) Relative to the many demands on today’s IT teams, spending capital, time and resources to maintain physical fax servers and infrastructure is not a high priority.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

746 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

13 Experts available now in Live!

Get 1:1 Help Now