Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Can't print from dos

Posted on 2012-04-11
Medium Priority
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?

Question by:FarpointC
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 26

Expert Comment

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

wordpad /pt <filename> <printername>

Accepted Solution

JT92677 earned 1500 total points
ID: 37838303

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.


Author Comment

ID: 37839516
I agree that it must be a redirection issue, rather than a driver issue. I'll try your suggestion.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

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:


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]

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.

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.


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.

Author Comment

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.

Expert Comment

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.


Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the world of WAN, QoS is a pretty important topic for most, if not all, networks. Some WAN technologies have QoS mechanisms built in, but others, such as some L2 WAN's, don't have QoS control in the provider cloud.
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

610 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