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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XP home net use problem

Status
Not open for further replies.

colem

Technical User
Jan 28, 2005
19
0
0
US
There is no XP Home forum here, so I figured this forum is the closest match.

Situation:
XP home machine is part of a peer to peer network. It needs to print from a dos program to a printer shared on another machine.

I have been using: net use lpt1 \\Server\HP /persistent:yes

Unfortunately every few days the printer won't work anymore, and I have to issue a net use /delete lpt1, and reissue the net use lpt1 \\Server\HP /persistent:yes command. Then it works again..

I wanted to run a batch file upon every login to issue the following commands:
net use /delete lpt1
net use lpt1 \\Server\HP
cls

First I just made a printer.cmd file with those commands and created a scheduled task for it to run upon each login, and I entered a user and password for an administrative user. That worked a couple times, but sometimes it wouldn't run. Very inconsistent.

So I tried the method of putting it in a folder shared as netlogon. That worked once and then didn't work upon subsequent reboots.

How can I have this printer mapped upon every login the right way?

For now I just put the printer.cmd on the desktop and told the user to double click it when the printer stops working.

It's an older hp laserjet.

Thanks for any advice.

NO DISASSEMBLE!
 
Place the .cmd file in c:\documents and settings\all users\start menu\programs\startup\

Computer/Network Technician
CCNA
 
There are some syntactical issues and possibly a permissioins issue that bother me in what you have written above.

The possible permissions issue is described here:
1. Download Devcon.exe and place it in %windir%\system32

2. Follow your original plan to use Scheduled Tasks, or LloydSev's notion above. The .cmd file should look like:

net use lpt1: /delete
devcon disable *PNP0401
net use lpt1: \\Server\HP /persistent:No
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top