Solved

MS-DOS programs won't print in XPP

Posted on 2003-11-24
20
2,727 Views
Last Modified: 2008-03-10
I have been  using Win98SE for years with no problems until I started upgrading to XPP.  XP right  out of the box appears to work as expected and prints from my DOS programs without any problem.  But as I re-install other windows programs, the DOS programs will eventually stop printing.  This does not appear to be due to any particular program as I have re-formated the HD and re-installed XPP many times and never had a particular program cause the problem twice.

But, one thing appears to be the same.  When the DOS programs quit printing, the spooler seems to be involved.  If I disable the spooler in msconfig, then I can again print from my DOS programs, of coarse then I can't print from my windows programs, which is also not good!  I don't get any errors, nothing shows up in the spooler, the hard drive shows some brief activity and then nothing!  Nobody seems to know where it goes or how to fix it ... including the Microsoft Tech's who say they've never even heard of anyone having the problem before and no suggestions on how to fix it except ... Yep! re-install XPP!  

I assume how the spooler handles this is being changed, but I can't seem to fine anyone that knows why or how to fix it.

For reference: I'm using a ibm thinkpad x31, not on a network and printing to a canon bjc-4300, but have had the same problem on other systems.

I hope there's a real expert out there that actually knows what's going on here.

Thanks,
Rick
0
Comment
Question by:DrRickdc
  • 8
  • 4
  • 2
  • +2
20 Comments
 
LVL 32

Expert Comment

by:Luc Franken
Comment Utility
You can try linking the printer to another port.
try this:

Net use lpt1: //localhost/printername /persistant:yes

LucF
0
 

Author Comment

by:DrRickdc
Comment Utility
From everything I've run into, this may work if you are on a network, but I'm not.
0
 
LVL 32

Expert Comment

by:Luc Franken
Comment Utility
You don't have to be on a network to do this, but you'll have to enable file and printer sharing, and share your printer.

that's why I posted "//localhost/" wich is your own computer
0
 

Expert Comment

by:FreekHendriks
Comment Utility
How many printers are installed? ... if more than one... change those ports to com1 or file instead of the LPT-port.

What if........
If you start printing WindowsXP will spool the printjob. But if you have an DOS application ... the printjob is 'given' to XP...spools it... and then XP prints.
BUT for the DOS-program this could be a signal that the job is finished.. and stops sending data.. (XP in this case).

I guess you have to change some settings in the printer properties.
Go to the Advanced tab and change to "print directly to printer"... and maybe switch of "enable advanced printing" (some where below the screen)
(I have a non-English version of XP so I don't know exactly the options)


Hopefully this helps.

Freek
0
 

Author Comment

by:DrRickdc
Comment Utility
I've tried the "print directly" before without any change, but thanks for the thought.

With the Net Use command, It was working before without this, so why should it have to be used now?? But, I still tried it ... but, without success.

Thanks again,
Rick
0
 
LVL 24

Expert Comment

by:Kenneniah
Comment Utility
On the advanced tab of your printer properties click on Print Processor and see what it's set to. Some program you installed might have changed it from RAW to something else.

BTW, until you figure this out a workaround would be to go to Start|Run and type services.msc
Locate Print Spooler, right click on it and select stop when you want to print from the DOS programs, then start it back up to print from Windows. Tis a pain but is easier then using msconfig until you get this fixed.
0
 
LVL 24

Expert Comment

by:Kenneniah
Comment Utility
You also might look through services.msc for another spooler service. Some printer drivers and programs install their own spooler service that might be causing problems. Brother printers for example like to install their own spooler service into XP. I've never had any problems with it, but I also don't print from DOS.
0
 

Author Comment

by:DrRickdc
Comment Utility
I checked the print processor before and saw that it was set to RAW so switched it back to TEXT but no luck!  I haven't tried your work around yet, but I will give that a try.

Thanks for the input.
Rick
0
 
LVL 24

Expert Comment

by:Kenneniah
Comment Utility
Also try going into device manager and looking at the properties of the printer port.
Under Port Settings, try using the different options for interrupts under "Filter Resource Method". First one I'd try is "Use any interrupt assigned to the port" It could be your dos programs are trying to access the printer port using an IRQ, and unless this setting is set, Windows does not assign one to the printer port.

There is also a checkbox for "Enable legacy Plug and Play dectection", try turning that on and see if it helps any. I doubt this one will do anything as it's not what it's intended for, but hey, it's worth a shot :)
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Expert Comment

by:FreekHendriks
Comment Utility
Have you tried the 'compatibility-mode"?
Open Windows Explorer.
Browse to the location of the application.
Right click on the EXE-file that starts...... and go to the tab "Compatibility mode". Try some options.



Freek
0
 
LVL 21

Expert Comment

by:gemarti
Comment Utility
How is your Canon printer connected to your laptop? Parallel port?

It is my understanding that the Spooler must me running because a program-NTVDM-actually provides a virtual LPT port to MS-DOS Applications.
For local printers just instruct your MS-DOS program to use the port directly.

Here is an Excerpt From:
Troubleshooting Windows Print Server Alteration of Print Jobs
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q132/4/60.asp&NoWebContent=1

MS-DOS Applications Running Locally
If you print from an MS-DOS application that is running locally, or from a Windows command line utility that sends data to a printer port, NTVDM receives the print job. NTVDM queries the redirector to determine if the redirector is managing the target port (you run NET USE LPT1: \\SERVER\SHARE) or if the spooler is managing the port.

If the redirector is managing the target port, the redirector takes control of the print job, and none of the spooler options are used. If the redirector is not managing the port, but a printer defined in Print Manager is printing to that port, the print job goes to the printer, and the printer's default datatype and spooling options are used. If neither the redirector nor any printers are managing the port, then the job goes to the port device driver, unaltered.

For example, one printer in Print Manager prints to COM1, none of the printers in Print Manager print to LPT1, and you issue a NET USE command to redirect output from LPT2 to a network print share. If an MS-DOS-based application prints to LPT2, the print job goes to the network print share. If the application prints to COM1, NTVDM submits the print job to the printer that prints to COM1, and used that printer's default datatype. If the application prints to LPT1, NTVDM submits the job directly to the parallel port device driver; no alteration occurs.

© 2003 Microsoft Corporation. All rights reserved.

Troubleshooting Printing Problems in Windows
http://support.microsoft.com/default.aspx?scid=kb;EN-US;163551

Excerpt:
Printing to a Local Device
Verify that you can print from a command prompt.

Non-PostScript Printer:

Type dir > lpt1 at a command prompt.

PostScript Printer:

For additional information about printing from a command prompt to a PostScript printer, click the article number below to view the article in the Microsoft Knowledge Base:
64859 Testing the Connection to a PostScript Printer

Plotter:

See the following Hewlett-Packard Web site:
http://www.hp.com/cposupport/plotters/support_doc/bpp01244.html


This tests to determine whether the parallel port driver and the hardware are working correctly. If you do not receive any output, get garbled output, or receive an "Unable to write to port" message, check the following hardware issues:
Check the cable and see if it meets the IEEE 1284 specification. If it does, it is marked on the cable itself.
Remove any switch boxes.
Perform a self test on the printer. If it prints correctly, the issue is with Windows or the program. If it does not print correctly, the issue is hardware related. Try disabling Plug and Play support in the computer's BIOS.
NOTE: Printing from a command prompt does not work if the printer is a PostScript Printer.


Try printing from WordPad or Notepad.

This tests the printer driver. If it prints correctly, the problem lies with the program. However, this does not mean that Windows is not involved. Windows may not be running a particular printing command that the program requires. See the "Program" section of this article.

If it does not print correctly, the problem may be in the printer driver. Try the following items:
If it is a PostScript printer, load the Apple LaserWriter NT driver. This is a very basic PostScript driver and using it will determine whether the problem is related to the particular PPD file for the printer.
If the printer is non-PostScript, load the Generic/Text Only printer driver. This is a very basic driver and using it will determine whether the basic printing stack is working properly.
If it is a plotter, load the Hewlett-Packard HP-GL/2 Plotter driver.
If the device does not print with the basic drivers, see the "Printing Stack" section of this article. If it does print, see the "Program" section.
© 2003 Microsoft Corporation. All rights reserved.
0
 

Author Comment

by:DrRickdc
Comment Utility
Tried the compatibility mode too, but nada!


BUT!!! Kenneniah the "Use any assigned interupt" seems to be working.  I'll do some more testing and get back to you.  If that is it .... I'd gladly kiss your "Expert" feet.

Thanks Again,
Rick
0
 

Author Comment

by:DrRickdc
Comment Utility
Oh Crud!!  

It appears we're back to square one.  It printed once after I set the "Use any assigned interrupt" but now won't work with that set either .... I have no clue why.  

Tried the DIR > lpt1 and this did print the directory as expected, but not sure why it won't print from DOS program.  

Again, this was working fine but quit working after I installed Microsoft Word.  I don't know if this has anything to do with it or not because it has done the same thing with other unrelated programs.

Connection is with a parallel cable but again printer and cable are not suspect because everything was working and continues to work fine when printing from a windows program.

Thanks for the help .... anymore ideas?
Rick
0
 
LVL 21

Expert Comment

by:gemarti
Comment Utility
Does your MS-DOS Program have a printer setup module. I think you need to setup the printer from the program...not from the DOS prompt.
0
 

Author Comment

by:DrRickdc
Comment Utility
Thanks for the thought, but it can't be the program because it was working fine before I installed the new program.  In fact all the DOS programs were printing fine before and then for no apparent reason, now they can't.  

Thanks,
Rick
0
 

Author Comment

by:DrRickdc
Comment Utility
I did some more checking and got a little more information that will hopefully point someone in the right direction by maybe knowing what it isn't.

I have had to re-format my disk and start over about 20 times now, so I have started making clones of my drive before I make any changes.  When I go back to the clone ( that is printing normally from my DOS programs) I checked the settings people have come up that might be suspect.  What I have found is that the settings appear to be the same on both drives.  At least all the settings that anyone has suggested changing.  Also on the drive that is working, I have never had to use the NET USE command either so this doesn't appear to be the problem.  The dir > lpt1 command will print and my windows programs have no problems on either drive.  

But, obviously something was changed that is preventing the data from getting to the printer.  The question is still what has been changed and how can it be fixed ... without starting all over again of coarse!  This is driving me a little nuts!  But, I'm hopefull that someone out there will know what is causing this or maybe just stumble across the answer.

Again I thank everyone for there input,
Rick


0
 
LVL 24

Expert Comment

by:Kenneniah
Comment Utility
Hmm, maybe try changing the timeout period for DOS printing at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WOW\LPT_timeout

A little info on this is found at:
http://www.resortdata.com/Customers/Knowledge/KB-DOS/K000036.htm

And I did see this on a Word Perfect for DOS site:
(8) If you use Windows 2000 or XP, and you have a printer connected to your computer through a parallel cable, and you can print from Windows applications but not from DOS applications, you may need to change a setting in the Windows control panel. Use the Start Menu, then (depending on your system) either Settings/Control Panel or Control Panel; if you do not see System on the list, use the option in the upper left of the window to switch to Classic View. Open the System control panel, go to the Hardware tab, click on Device Manager, and find Ports on the list; click on the plus sign next to the word "Ports" to expand the list; double-click on "ECP printer port (LPT1)", go to the Port Settings tab, and, if there is no checkmark in the box next to "Enable legacy plug and play," add a checkmark and click OK. Then close the Device Manager and the System control panel. (Information provided by Len Weber.)
0
 

Accepted Solution

by:
DrRickdc earned 0 total points
Comment Utility

Unfortunetly, no one came up with the answer to my problem so I did some more checking and finally came up with a solution.  I still haven't found out why it happens, but I do know that it is related to loading new programs.  

The solution I found comes from a book by Curtis Simmens, Windows XP Secrets where he gives a list of things that may help.  The one that got the printer working again was Reinstalling the printer port as follows:

1) Click Start and go to the control panel
2) Double click the systems icon
3) Click the Hardware tab
4) Click then the Device Manager button (towards the bottom)
5) In the device manager, go down towards the bottom of the list to ports and click on the + sign to expand it.
6) Right click on the printer port (usually LPT1) and from the popup list click Uninstall or remove depending on your system
7) After rebooting your system, go to Add/Remove hardware in the control panel
8) It will walk you through the reinstall process, but from the list again choose the LPT1 printer port to install.

SN:  I have found this will get the DOS printer working again, but you sometimes have to remove the port and reinstall it a few times.  I've also found if Windows finds new hardware and install it for you, it doesn't seem to fix the problem. It seem to have to manually reinstall it to fix the problem.  

Also, when reinstalling, if a list comes up with only 2 or 3 to pick from it never seems to work.  In this case I've had to remove the port again and go through the same process until a longer list comes up. A few times, I've also had to remove the printers and printer port and reinstall all, but you can't have the printers connected when you reboot or this will cause windows to find new hardware and install it like it was before.  Disconnecting the printer and manually installing the printer port first and then manually reinstalling the printers seems to work where the other doesn't.

I hope this will help others who run into this problem.

I also want to thank all who gave it their best to help out.  I appreciate all your efforts and especially Kenneniah who had some great info and obviously put a lot of time into it.

Thanks,
Rick


0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

763 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

6 Experts available now in Live!

Get 1:1 Help Now