Printer Change and 16- versus 32-bit Applications Unsuccessfully Printing
Keywords:
Question:
We have Win95 and Novell4.1. I have several winbatch files that set the win95 default printer
by reading a
text file with the type of printer and then either capture a novell queue or end all capturing
to allow local
printing. When we boot up 95, one of the winbatch routines is automatically run to attach to
the users
default printer. If the user prints from any 32-bit or dos app FIRST, everything works fine.
If the user trys
first to print from Groupwise 4.1 (16bit) or a custom visual C++ program we written (16bit)
the printer
only works about 50% of the time. In the instance that the printer does not print, it will
not print for any
application (even 32bit) from that point forward. I'm not sure of the Winbatch version I have,
but I
purchased Winbatch only 2-3 months ago so it should be a recent version.
Answer:
Try:
- Start windows with the script that is causing you problems.
- Export the registry and the win.ini file
to a safe directory.
- Print from a 32 bit app or do the printer control panel stuff that seems to fix the problem.
- Export the registry and the win.ini file to a different safe directory.
- Compare them to see if there are *ANY* changes. That may be a very important clue.
Question (thread continued):
Excellent! I think we have hit on something here. The Win.ini file seems to be the problem. The
"DEVICE=printername, hpdriver, lpt1:" changes. When winbatch pulls the "hpdriver", it is pulling it with the
.drv extention in place and writing that to the win.ini. Once I print from a 32-bit app the .drv is gone from
the win.ini. To test this I rebooted, ran the script, edited the win.ini manually to remove the .drv and then
printed sucessfully from groupwise. Any idea why this is causing a problem? I am going to use the string
functions to trim the last four characters from the hpdriver variable unless you have a better suggestion.
Answer:
Finally we tracked it down. We updated the "Changing Windows 95/NT Default Printers"
example for the next guy... (this message dated May 21, 1997).
Article ID: W13697
Filename: Printer Change and 16 vs 32bit Apps Failing.txt
File Created: 1999:04:15:16:55:46
Last Updated: 1999:04:15:16:55:46