Question

Redirect LPT1 to Default Printer

Asked by: ednetman

A department in our corporation uses and old DOS type program for some of its more critical functions.  The way the program is written, it will only print to LPT1.  The department has several hundred workstations and many different printers, so pointing LPT1 to a single printer is not an effective solution.  I am looking for a way to have LPT1 automatically redirect to the default printer for that particular workstation.  I don't mind installing a small client on the desktop to accomplish this.  Has anyone had a similar issue, any ideas?  Can the mode command be used?

Windows 2000, SP3 printing to varying models of HP LaserJet and Lexmark printers connected directly to the network with their own IP address.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-11-03 at 08:08:51ID20786291
Tags

lpt1

,

printer

,

redirect

Topic

Printers

Participating Experts
6
Points
0
Comments
15

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. LPT1 and NT4
    I have installed NT4 on server. Whenever I try to print (eg test page from 'Printers' panel etc) to LPT1 I get message "Error writing to LPT1 for etc etc..(doc name).. Access Denied. Do you want to retry etc? " Even when logged onto server as Administrator, ie goi...
  2. map networked printer  to the computer's LPT1
    I have a software that requires me to print to the LPT1. Is there a way i can map the lpt1 to the network location, so that i can print to the LPT1 and it will print to the network printer.
  3. LPT1:
    I have a P3 running win98se I have not used my printer recently and now I find that it will not work.After trying to use it I sometimes get a message saying can not connect with lpt1 some other application may be useing it. Nothing else is useing it. My printer is an HP 710C ...
  4. LPT1 will not work.
    I have having problems with my LPT1 port. Machine COMPAQ Presario model 1692 with Win 98 2nd edition. Two years old Problem: I am constanly getting a Rundll32 error when I try to print. When I go to start/settings/printers and select the printer properties is when I get it...
  5. Lpt1 to Ethernet- is this possible
    I have one network printer and rescently I have had to install a piece of software in another office that requires jobs to be sent through lpt1. I need it to print on the network printer. Is there such a beast that exists , software or a piece of hardware to convert the lpt...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: MASQUERAIDPosted on 2003-11-03 at 13:22:29ID: 9674085

You should be able to redirect by capturing the printer port in printer settings

This Googled from (http://www.edimax.com/html/Faq/FAQ_PSwin.htm)

Q:  I need to print from a DOS application. How can I do that?

The DOS program only can print to LPT1 or LPT2 of the local printer port of computers.  Therefore, you need to capture printer port and redirect the LPT1 to a network printer port for the Print Server.

The procedure for windows 2000 and XP workstations is not the same with the procedure for windows 95/98/NT/ME.

For windows 95/98/NT/ME network, you need to share the printer from one computer so another computer can do the redirection.  It  means one of your computer needs to be on for other computers can print the DOS program.  In our example below, machine B is the windows 95/98/NT/ME machine that needs to print DOS application.

First of all, make sure you have one machine (suppose machine A) print fine from a windows application to the print server device.  Then click on Start button.  Select Settings.  Select Printers.  Right click the mouse on the printer icon and then select Sharing.   If you do not have the sharing option, you need to enable the File and Printer sharing option in Network of Control Panel.
Under Sharing, enable the sharing and assign a share name (suppose HP4000sharing) then click OK.  You will see a hand underneath the printer icon.
Find out  the computer name by going to Network in Control Panel.  Click on the Identification tab.  You will see the computer name.  Write the computer name down.  Here in our example, we use machine A as the computer name.
Go to the machine (suppose machine B) that needs to print the DOS application.  Click on the Start button.  Select Settings.  Select Printers.  Right click the mouse on the printer icon and select Properties.  Click on the Detailed tab.
Click Capture Printer Ports button.  Make sure you select LPT1.  In path, type \\ComputerName\ShareName which computer name and Printer share name are the names in step 2 and step 3 above.  In our example, it is \\machine A \HP4000sharing.
Check the option 'reconnect at logon'.  By doing so, you will save the settings even you reboot your system.
Click OK.  And click Apply or OK button.
Now you can test print your DOS application from your computer machine B.

If your machine B runs windows 2000 or windows XP, you do not need Machine A share the printer.  Have the windows 2000 and XP share the printer and redirect LPT1 to the computer itself.  For example, in step 5, machine B can redirect LPT1 to \\machine B \HP4000sharing directly.


 

by: ednetmanPosted on 2003-11-03 at 13:31:42ID: 9674139

Good try, but not quite what I was looking for. That would require mapping LTP1 on several hundred workstations. Since I don't know what printer each user has set up, this could take days to deploy. I was thinking of some king of DOS command or clinet that I could push remotly using Ghost, set a shortcut in "All Users" startup to redirect LPT1 to whichever printer this user has selected as their default. The users have the ability to change their default printer amoung the list of installed printers we provide, however they cannot add or delete them.  this is especially usefull when a printer goes down.

 

by: MASQUERAIDPosted on 2003-11-03 at 13:52:39ID: 9674283

How about creating a utility that finds the default printer & then remaps it?

Detect default printer ....

----------------------
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("Wscript.Shell")

sOSversion = GetOS() 'Return either WinNT/2K or Win9x/Me

If sOSversion = "WinNT/2K" Then
sOldDefPrtr = oShell.RegRead(_
"HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion" & _
"\Windows\Device")

Elseif sOSversion = "Win9x/Me" Then
sCurrentConfig = oShell.RegRead(_
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\IDConfigDB" & _
"\CurrentConfig")
sPrtrName = oShell.RegRead(_
"HKEY_LOCAL_MACHINE\Config\" & sCurrentConfig & "\System" & _
"\CurrentControlSet\Control\Print\Printers\Default")
sOldDefPrtr = oShell.RegRead(_
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print" & _
"\Printers\" & sPrtrName & "\Port")

Else
sNewDefPrtr = "Undetermined! (Old default printer could not be
recognized.)"
End If
--------------------

 

by: Max88CanPosted on 2003-11-04 at 14:08:17ID: 9682557

My solution should work for you but if you already have a hundred computers deployed each one will probably have to be updated.  I don't know how to push printer settings down to workstations but if you can install or reconfigure workstations using ghost  then this might work.

On the computer with the default image, go to the properties window for each printer on your network and perform the following steps.  

1. Go to the ports tab and check the "Enable Printer Pooling" checkbox.  

2. Now in the list of ports check LPT1.  You should now have two ports checked, the orignal port for the network printer and the LPT1 port.  

The concept here is a printer pool is a collection of printers that are exactly the same and when printing to this type of printer the first available printer is chosen to be printed to.  By performing the above steps you have created a bunch of printer pools that consist of one printer and an LPT1 port.  When a job is directed to LPT1 and since there is no printer there, it will print to the "other" printer in the pool.

So when a user selects their default printer, they will have the ability to print to LPT1 without you having to know the default printer name.

Hope this helps.



 

by: ednetmanPosted on 2003-11-04 at 18:42:31ID: 9683918

Wow!  That's a cool trick.  Problem is that the users can select their default printer so I would not know which printer to add the print spool to.  I think I am looking for a batch file, VB Script, or executable that can gather the profile specific settings and make the changes for me.

 

by: ednetmanPosted on 2003-11-10 at 17:49:29ID: 9719429

The printer pooling trick works.  Does anyone know of a batch file or VB Script that can enable printer pooling and then select LPT1?  I know the port names for all the existing printers, however the IP adresses vary widely.

 

by: Max88CanPosted on 2003-11-11 at 07:49:48ID: 9723046

I found this on Microsoft's technet, it uses VB scripting to get things done.  Maybe some of the information found here could be used as a basis to push down your printer settings.

http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/printing/ScrPrn16.asp

 

by: TerranITPosted on 2003-11-12 at 11:15:39ID: 9733794

Something we used to do on an NT network a few years back might be useful for you in this situation. If you can map network drives, or print to network printers, this should work for you.

NET USE

This command allows you to map a local drive -or devicename- to a network resource. In this instance, you'll want to use the following syntax:

NET USE [devicename] \\servername\sharename

"servername" can be any computer on the network which is sharing a resource, in this case a printer. Since we're mapping printing, you can issue this command as follows:

NET USE LPT1 \\servername\sharedprinter

You can check the existing mappings by typing NET USE at the command prompt. Additionally, you can delete mappings using the following:

NET USE [devicename] /DELETE

If you wish a mapping to persist after logon/reboot, you can use the PERSISTENT keyword as follows:

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

To make this a little easier for you on a network, you can add the command syntax to your logon script. So, for example, you could have lines in logon.bat (or whatever the sript name) as follows:

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

Then include the appropriate shared printer in the logon script for each group of users so that they can print to the correct network printer.

For the users, this is completely transparent: their applications will print to LPT1 and the output will be automatically routed to the network printer.

This solution works for -most- applications. Of course you will wish to try this first in a test environment.

Good luck, and post back to let us know how it goes!

Regards,

Daniel Mann
Terran Enterprises Corp

 

by: MASQUERAIDPosted on 2003-11-12 at 11:23:52ID: 9733857

Now that one I like!  (makes notes for future use) M :o)

 

by: ednetmanPosted on 2003-11-24 at 09:06:02ID: 9811917

The printers are not shares, so I can't make it map back to itself.  Does anyone know how to share a printer or enable printer pooling from a batch file or VB Script?  They all have a printer with the same name and same port name, although the IP for that port will differ.

 

by: ednetmanPosted on 2003-12-01 at 09:33:07ID: 9851573

Either option will work.  If printer pooling were enabled and the script could make it watch LPT1 as well as the IP address or if we can share the printer with a generic name, then we would be ready to go.  Is there any DOS command, VB Script, local or domain policy that be used to enable this?

 

by: hdhondtPosted on 2004-04-16 at 03:02:18ID: 10840738

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
PAQ/Refund
Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

hdhondt
EE Cleanup Volunteer

 

by: moduloPosted on 2004-04-20 at 13:26:20ID: 10872159

PAQed, with points refunded (500)

modulo
Community Support Moderator

 

by: kamyers1Posted on 2004-08-25 at 17:52:30ID: 11898650

I'd just like to add that I need a solution to the same problem as the original poster, and that none of the answers provided so far fit the bill.  Key requirements: 1) The solution must redirect printing to the DEFAULT printer, whatever that happens to be on the specific machine in question.  2) It must NOT be necessary for the printer in question to be set up as a NETWORK or SHARED printer, even only on the specific machine itself.  I.e. it must work for USB or pure network printers (e.g. TCP/IP ports, not print servers on other machines) without being forced to define a new share.  3) The solution must NOT require specification of a specific printer name that might DIFFER on every machine where the solution is implemented.

s/KAM

 

by: ednetmanPosted on 2004-08-25 at 18:20:09ID: 11898782

I never was able to find a solution.  We have just been fixing them one at a time as they complain.  I fixed the image so that printer pooling is enabled on the printer that all users have.  It isn't the best solution, but what else can i do?

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...