Link to home
Start Free TrialLog in
Avatar of DrRickdc
DrRickdcFlag for United States of America

asked on

MS-DOS programs won't print in XPP

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
Avatar of Luc Franken
Luc Franken
Flag of Netherlands image

You can try linking the printer to another port.
try this:

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

LucF
Avatar of DrRickdc

ASKER

From everything I've run into, this may work if you are on a network, but I'm not.
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
Avatar of FreekHendriks
FreekHendriks

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
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
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.
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.
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
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 :)
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
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.
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
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
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.
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
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


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.)
ASKER CERTIFIED SOLUTION
Avatar of DrRickdc
DrRickdc
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial