Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows 2000 has lost lpt1 mapping after using net use command! 1

Status
Not open for further replies.

n2jesus

Programmer
May 20, 2003
66
US
I am using net use to map some of our older programs to novell network printers. this works fine. however, when I use the "net use lpt1 /delete" command and try to print from the local printer, I get a non-specific print error on lpt1.

How do I make windows 2000 see the printer port again after using net use?

Thanks,

n2jesus
jimm@servicemate.com
 
im confused..

are you still trying to delete it, or do you want to remap it again?

pbxman
Systems Administrator

Please let Tek-Tips members know their posts were helpful.
 
Some times the user has to print to a network printer. For this I am using net use. They also want to be able to print to the local printer attached to the parallel port.

The problem is, after mapping with net use and then deleting the map windows 2000 will not print to the parallel port (lpt1).

I have to reboot the computer to make it see the parallel port again.
 
I haven't tried it, but you could use a batch file to take care of all this. Something like a file called "Use network printer" that contains:

net use lpt1 \\servername\printername

then another batch file called "Use local printer" that the user clicks on that has:

net use lpt1 /d
net stop "print spooler"
net start "print spooler"

? See if that works.

pbxman
Systems Administrator

Please let Tek-Tips members know their posts were helpful.
 
When you remap your LPT1 using NET USE, you capture the port, so any local printer on LPT1 will no longer work until you delete the map.

Most of the time, you need this command for Novell or DOS related softwares.

I usually place an icon on the users desktop, which is actually a batch file that goes like this:

net use LTP1: /d
net use LPT1: \\DC1\HPLASER4
c:\accpac\plus.exe
net use LPT1: /d

You must inform your user that when they are in that DOS program that the local printer WILL not work and it will be redirected to the network printer that you map.
 
Thank you for your help, but no, it still doesn't work.

I have even tried sharing the local printer and then using net use to map to it that way. This doesn't work either.

Right now the only way that I can undo the changes made by net use lpt1... is to reboot the computer.

after running net use lpt1 /delete, windows will not find the parallel port until the computer is rebooted.

any other ideas?
 
why dont you use lpt2 for your local printer, and stick with lpt1 for your network printer?

pbxman
Systems Administrator

Please let Tek-Tips members know their posts were helpful.
 
If you use LPT2, you then must modify your DOS software to use LPT2 and that can cause trouble if it's a networked application and not everyone has the same config. One thing is sure, everybody has an LPT1 and all DOS software use LPT1 by default... so yes, you may use LPT2, but you may get headaches with your DOS software now.
 
no, you can set your local printer (windows printer) to use lpt2 and that will leave lpt1 open and available for the DOS software pointing to a network printer.

pbxman
Systems Administrator

Please let Tek-Tips members know their posts were helpful.
 
Good point. I was replying as if there was no local printer.
 
yeah - i think using lpt2 for the local printer and lpt1 for the network printer will do the trick. I just tried it on mine and it works from DOS and Windows. Give that a shot, n2jesus.

pbxman
Systems Administrator

Please let Tek-Tips members know their posts were helpful.
 
thanks, I will, but I'm in the middle of something else right now. I will let you know if it works.
 
Thanks for the help. I switch to lpt2 and it solved the problem on that computer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top