Thursday, June 09, 2005

Printing to a network printer from MS-DOS

1. Map the network printer to a parallel port - LPT1 or LPT2. To do so -

Net use lptx
file:////printservername/printersharename [/persistent:YES]

If you use the 'Peristent' option, the mapping will be saved for the next login.

2. Print from the MS DOS application. To do so -

C:\Print anand.txt

Note : By default, it will print onto the printer mapped at the lpt1 port.

C:\type anand.txt > lpt1

If you have mapped the network printer to the lpt2 port, then -

C:\Print /D:lpt2 anand.txt

OR

C:\type anand.txt > lpt2

----

Viola! It could not be any simpler...

Ref URL -

http://support.microsoft.com/?kbid=154498

http://blogs.ineta.org/dtotzke/articles/26204.aspx

Note :

1. To delete mappings, use the command -

net use /DELETE lptx

2. To view all the network resources mappings, use the command -

net use

(with no parameters)

No comments: