Vista and dos program printing?

L

Loretta

Customer just purchased a cheap Dell from Wal-Mart(looks Cheap too). He has
an old point of sale program that runs in dos mode. It will not print to the
Okidata ML 182(ancient) printer. The printer is set up to the usb port via a
parallel converter. Because he was not using a surge protector or battery
backup he also lost the UPC scanner that I think goes with the program. He
should have replaced all this new with a decent computer but his son talked
him out of it.
So First is there a way to get this printer to print in dos mode on a Vista
operating system?
Thanks Loretta
 
P

philo

Loretta said:
Customer just purchased a cheap Dell from Wal-Mart(looks Cheap too). He has
an old point of sale program that runs in dos mode. It will not print to the
Okidata ML 182(ancient) printer. The printer is set up to the usb port via a
parallel converter. Because he was not using a surge protector or battery
backup he also lost the UPC scanner that I think goes with the program. He
should have replaced all this new with a decent computer but his son talked
him out of it.
So First is there a way to get this printer to print in dos mode on a Vista
operating system?
Thanks Loretta

No way will you get "real mode" DOS access on any machine running Vista , XP
or Win2k

If they insist on using that hardware and application...they probably should
get an old Win98 machine...
that can run "real mode" DOS
 
A

Andrew McLaren

philo said:
No way will you get "real mode" DOS access on any machine running Vista ,
XP
or Win2k

I belive that is incorrect.

DOS applications can certainly run on Windows 2000, XP and Vista. They are
enabled by the "NTVDM" 16 bit subsystem which is an integral part of all
these operating systems. Many customers run legacy DOS applications such as
POS apps, on XP and Vista.

Specific DOS applications may have compatibility problems; it's always best
to test, before making too big a commitment. But in general terms, a
"well-behaved" DOS program should work. DOS apps which try to directly
address the hardware will often fail.

Any printer - USB, network, LPR etc - can be mapped to a DOS device port, by
using the "NET USE" command. For example, say you have a new USB printer
attached to the computer. Let's call it "Printer1".

In Control Panel, Printers, highlight Printer1 and right-click.
Choose "Sharing" from the context menu.
Make the Printer shareable - give it a share name, can be the same as
printer name eg "Printer1".
Go to Start Menu, Accessories, and right-click the Command Prompt icon.
Select "Run as Administrator".
In the administrative command prompt, run this command:

C:\>NET USE LPT1: \\computername\Printer1

The command should respond with "The command completed successfully". Now,
any DOS application which tries to print to LPT1:, will print to Printer1 -
even if it is not attached to a real, physical parallel port.

You should only need to set this up once. After that, the device mapping
will remain persistent, until you explicitly remove it with:

C:\>NET USE LPT1: /D

to delete the mapping.

Note that you need to enable file and print sharing in Vista, in order to
share printers.

There are a few caveats. There were many different ways you could program a
DOS application to print. The NTVDM in Vista copes with a few of the most
common DOS printing techniques. However, if an application tries to use a
less common printing method, it may continue to fail on Vista, even after
you map an LPT port. So, as I say, you really need to test and confirm,
before laying down big bucks or burning any bridges.

Note also that all the above only applies to 32-bit Vista. You cannot run
DOS apps on 64-bit Vista, or on any 64-bit version of Windows (XP, Server
2003, Server 2008).

There are some other alternative strategies to enable a DOS application on
Vista, which may help if the above does not work. Microsoft's canonical
solution is to download and install Virtual PC:

Virtual PC 2007
http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx

You create a virtual machine using VPC and install DOS into that VM. Then
you run the DOS app, in the DOS VM, running in a Window on your Vista
Desktop. The DOS app then has a pure DOS environment to work in. Virtual PC
will redirect any printing in the VM to any Windows printer - doesn't need
to be parallel attached.

If a commercial customer doesn't mind using unsupported, open source
software, DosBox is also a very good DOS emulator for Vista.

Good luck with it,
 
W

w_tom

Windows NT based OS (such as Vista and not to be confused with
Windows 9x based OS) do not let programs talk directly to hardware.
This made NT based OSes so reliable AND permitted multitasking. The
DOS program talks to NT software. NT software then passes along those
commands to the printer. But which printer? DOS is talking to
LPT1:. Is Vista configured so that LPT1: is redirected to the Okidata
ML182 dot matrix printer?

Of course other obvious questions such as which printer mode is
Vista using to talk to the printer - the Okidata or Epson (IBM PC)
protocol?

DOS program do work on NT based OSes. But that assumes the DOS
program was talking to hardware by Microsoft approved methods. If not
using those approved methods, then the NT OS software may not know how
to handle command requests from that DOS program.

Dell hardware has nothing to do with this problem.
 
P

philo

Andrew McLaren said:
I belive that is incorrect.

DOS applications can certainly run on Windows 2000, XP and Vista. They are
enabled by the "NTVDM" 16 bit subsystem which is an integral part of all
these operating systems. Many customers run legacy DOS applications such as
POS apps, on XP and Vista.


<snip>


Yes and no.

Though many dos applications can run on an NT system...
they cannot get "real mode" access.
Win98 was the last OS to allow it.
 
A

Andrew McLaren

philo said:
Though many dos applications can run on an NT system...
they cannot get "real mode" access.
Win98 was the last OS to allow it.

It's not so much a matter of "real mode". DOS always runs in real mode, ie,
the 20-bit segmented memory model of the x86 processor; as opposed to
protected mode where the x86 CPU allows 24, 32 or 64 bit addressing, with
memory protection (rings). In fact it is protected mode DOS applications
(DOS apps which use a 32-bit memory extender) which have the most
difficulty, runnng in an NTVDM.

I think what you're calling "real mode" is in fact the tendency in DOS apps
to bypass BIOS Interrupts and directly access hardware by writing to
physical addresses. This isn't a matter of real or protected mode, as such.
But to preserve system integrity, it is not allowed by most 24-bit, 32-bit,
and 64-bit operating systems. NT disables most BIOS interrupts except Int2e,
so that system services must be requested via device drivers.

Windows 95 and 98 ran on top of a kernel which still contained a large
amount of 16-bit code in the kernel; so there was a high degree of
compatibility for DOS applications. DOS apps which tried to directly address
hardware often still resulted in exceptions, even on Windows 9x. On NT
(including 2K, XP and Vista) DOS apps run in the context of the NTVDM, which
uses the x86 "Virtual 8086 mode". The emulated machine is a real-mode
machine. The level of compatibility is a bit lower than Win 9x - but still
quite reasonable, for many DOS apps.
 
D

Davide Guolo

Loretta,
Customer just purchased a cheap Dell from Wal-Mart(looks Cheap too). He has
an old point of sale program that runs in dos mode. It will not print to the
Okidata ML 182(ancient) printer. The printer is set up to the usb port via a
parallel converter... is there a way to get this printer to print in dos mode
on a Vista operating system?

you may want to have a look at Printfil to capture the DOS LPT1: output
and forward it to any printer installed on the Vista machine, including
Windows-Only (GDI) and virtual printers. A free trial version is
available at http://www.printfil.com/download

Before creating the "Printfil" virtual printer used to capture the LPT1
port on your Vista machine, please see http://www.printfil.com/efaq14.htm

Should you find out that after configuring Printfil to capture the LPT1:
port a simple "DIR > LPT1:" issued from a Command Prompt is correctly
redirected to your Vista printer while your DOS program's job are not,
then your program might be one of those which uses direct hardware calls
to address the LPT1 port, as others already mentioned.
If so, please contact us by the Help->Contact Support Printfil's menu
entry so that we can check your local machine configuration and suggest
you some alternatives to solve the problem.

Kind regards,
Davide Guolo
aSwIt s.r.l.
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.printfil.com
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.aswit.com/odbc4all
@Kill - Batch Close Windows Applications - Freeware
http://www.aswit.com/akill
--------------------------------------------------------------
 
T

Tim Slattery

philo said:
Though many dos applications can run on an NT system...
they cannot get "real mode" access.
Win98 was the last OS to allow it.

32-bit Vista will run 16-bit applications, including 16-bit real-mode
(DOS) applications. It will not allow those apps to directly access
hardware. Many DOS apps used to do that to speed things up.
 
S

sts-shekhar

Many of our clients use DOS Printing (from within Windows based POS Software)
on Dot Matrix Printers - we have now issue only with Network Printing on
Vista (Home Basic) - it says ACCESS denied - I would really be grateful - if
I could get the solution to this issue. We have tried NET USE also.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top