# DOS Net Use IP Capture



## swaters (Jul 21, 2003)

Currently, I'm capturing a shared printer in a batch file using:

net use lpt1: \\servername\sharename

We use the batch file in a legacy report writing app called RR which is completely DOS based. We've been having problems with the server share and want to eliminate it. The printer does have an IP address and we'd like to capture it using that. I have tried all kinds of captures. I believe the closest I have gotten is:

net use lpt1: \\ipaddress\printername

Please bear in mind that this legacy app is running on Win9x as well as XP so the DOS command must work in both versions of the OS. RR requires the logical printer port (lpt1) to be used so I cannot create a port and set it to print to that. I have been successful in creating Standard TCP/IP Ports on 9x machines using an HP app. Is there a way to setup a port on the machine I'm printing from and capture that port? Thanks.


----------



## Jedi_Master (Mar 13, 2002)

Howdy swaters...

Just a few questions...

This DOS app, will it print to a printer that is setup on a standard LPT port, that is setup in windows ?

The printer is it on a print server, or shared from a pc ?

Because...if you're trying to what I think you're trying to do, I'm not sure it will work, I think the drivers for the printers will have to be setup as local printers on each pc, then change where it is pointing to for the printer...


----------



## swaters (Jul 21, 2003)

The DOS App will only print to LPT1: That is why we use batch files to capture the port (currently to a server share, we want to change it to an IP Address). The printers have internal print servers (they're a Canon ImageRunner 8500 and two 5000's) with static IP addresses. I was thinking of installing the printers locally, and then sharing them and capturing them to LPT1:, but the whole idea of this is to remove all printer shares. We've been having problems with what looks like Bug Bear (prints hundreds of pages with gobble-de-**** at the top) but it only prints to one printer at a time (doesn't infect the whole network like bug bear usually does) and we've scanned the server and not found any viruses. If you have alternate solutions I'm open to them. This just looked like a good solution at the time. Thanks.


----------



## Jedi_Master (Mar 13, 2002)

> I was thinking of installing the printers locally, and then sharing them and capturing them to LPT1


This is sort of what I had in mind...

Install the print drivers drivers locally as a LPT printer, then add a Standard TCP/IP port in the properties of the lpt printer...



> I have been successful in creating Standard TCP/IP Ports on 9x machines using an HP app


This didn't work with XP ?


----------



## swaters (Jul 21, 2003)

Because they use this app to print to different printers, we can't install a printer directly to LPT1: That is why we write the batch files to capture LPT1: as the shared printers. The users have very basic skills and might struggle with changing the port and driver everytime they need to print somewhere else.


----------



## jhiltner (Mar 9, 2004)

We have the same problem. a further clue was that our administrator users worked fine but nobody else did. I found this link that might help

http://www.experts-exchange.com/Operating_Systems/Win2000/Q_20790791.html


----------



## jhiltner (Mar 9, 2004)

sorry, that wasn't entirely clear. if you look through that link you'll see a microsoft article. when you go to the microsoft article they tell you that in win2000, xp, and 2003 you can't redirect lpt1: with "net use lpt1: "(assuming you have a hardware port lpt1 unless you are an administrator. They suggest doing either lpt2 or lpt3 since most people don't have more than one parallel port. other users in that link also suggest a couple other commands to use.


----------



## Rockn (Jul 29, 2001)

Why not just capture the network printer on the PC the app is running on directly in the printer settings. It will then emulate a printer connected directly to LPT1 on the local machine regardless of the make or model. If it were already caprured you would only need to point the print job to LPT1


----------

