Re: DOS printing to a network printer

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ron Lowe (ron.lowe_at_{DELETE}btopenworld.com)
Date: 06/24/04


Date: Thu, 24 Jun 2004 08:53:57 +0100


"Dennis Eger" <DennisEger@discussions.microsoft.com> wrote in message
news:559BEC0D-9BC7-4E72-9AB7-9E9B413E8D81@microsoft.com...
> I need to print from a DOS program to a network printer on a print server.
How do I do this?? You used to capture the printer, so how is it done with
Windows XP and TCP/IP?
>
> The DOS program will print to lpt2 since lpt1 is on the computer
> The print server TCP/IP address 192.168.1.10
> The printserver port is P1
>
> Thanks
> --
> Dennis Eger

1) Set up the printer in windows initially.
    Forget about DOS for now.

The usual way to do this is to:

Ensure you can ping the printer's IP
address from the command line.

Start | printers and Faxes | add a printer;
Next;
Local Printer, Do not Auto-detect, Next;
Create a New port, Standard TCP/IP port, Next;
Next;
Enter the printer IP address;
Leave the port name as it defaults;
Sometimes it mistakes the JetDirect card for a multi-port device.
If it asks, use Parallel 1.
Finish the wizard.
( It grinds for a while here )

Now, select your printer driver from either the windows-supplied
drivers, or use 'Have Disk..' to browse to your downloaded drivers.

The Add Printer wixard finishes.

R-click the new printer, and choose 'properties';
   - Ensure the printer is using the new 'Standard TCP/IP port'.
   -Set up any device options that may be installed on the printer.
   ( eg duplex, sorters, finishers, saddle staplers, paprer trays etc ).

You should now be able to send a test page from within windows.

2) Set up printing for DOS apps:

-Ensure the printer is working from within windows;
-Share the printer, even if it is set up on the local machine;
    ( if there's no physical LAN card in the machine,
    you may need to install the 'loopback adapter' to
    get file and print sharing options to appear.)
-Give the printer a share name.
-Then issue the command:
    net use LPT2 \\pc-name\share-name

Then issue the command "net use".
Look to see if it worked.
This is the output on my machine, see how LPT1 is now
mapped to a shared printer on the same machine...

Status Local Remote Network
--------------------------------------------------------------------------
OK LPT2 \\rons-pc\epson Microsoft Windows Network

Printing from the dos app to LPT2 should now be captured and sent to
the network printer which just happens to be on this same machine.

--
Best Regards
Ron Lowe
MVP - Windows Networking


Relevant Pages

  • ~~~~~~~~~~~~~~ FILE NAME ~~~~~~~~~~~~~~
    ... adapter description file file name extension ... apple script to change file names ... batching file name changes in windows ... change short file names in dos ...
    (sci.misc)
  • Re: Linux syscalls
    ... > A device driver or a rewrite of DOS could permit this, ... really "DOS inside Windows" or "Windows inside DOS"? ... > DOS interrupts are revectored... ... if you re-write DOS to use the _Windows device drivers_ ...
    (alt.lang.asm)
  • [Full-Disclosure] ron1n phone home, episode 4
    ... Hacking from Windows 3.x, 95 and NT ... Use secret Windows 95 DOS commands to track down and port surf computers ... Download hacker tools such as port scanners and password crackers designed ... Now you have the option of eight TCP/IP utilities to play with: telnet, ...
    (Full-Disclosure)
  • Re: MS and security: good effort but no cigar
    ... And last but not least, no fat, no dos, no multiboot. ... build upon the progress it's already made in security. ... a Windows system, it is still surprisingly easy to completely own that ... Then there's the issue of poorly secured server applications. ...
    (microsoft.public.windowsxp.general)
  • Re: assembly language and reverse engineering
    ... in Windows assembly programming what you can't learn when doing ... Windows API but about assembly programming). ... And you have far less to learn to get your first working DOS program than ... but, real mode is real mode, and pmode is pmode. ...
    (alt.lang.asm)