Discussion Locked

Net Use Statement in XP

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am trying to get a the net use statement to automatically run when the XP machine boots up. I can run it fine if I type it in from the dos prompt manually, but that will be too much for the users. I know in Win2K I was able to put it in the autoexe.bat file, and it ran fine. But XP doesn't have that. I have tried it in the autoexec.nt file, but it doesn't work. When I run the net use statment, and tell it to stay persistent, I can reboot the machine, and it actually shows up, but it saysthe connection is unavailable. If anyone can shed some light on this, I'd appreciate it. Thanks.

7 replies

by cactus pete

Generally, you should accomplish this with a login script, or at least a batch file in the startup group.

by cactus pete

Ah, if it's a permissions issue... You should change the permission settings on the machine acting as the print server.

Conversely, you could specify the user account and password to use when connecting. Type NET USE ? to see how.

by keyboard cowboy

That is a good idea about the batch file. However, my next problem is a permission error. As the admin, it lets me log into the print server fine, but when I try to as one of the regular users, it gives me an access denied. I'm assuming it's because they don't have the neccessary account access. Is there any way to get it to run before Windows even boots, so that it's not username specific? Thanks.

by stuart_at_oz

you could try adding the command to the registry in the RUN SERVICES key - or a reference to a batch file that runs the command...... in WIN98 it's at: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices

not sure about XP though.

If the user is logging onto a domain, can you put the mapping in their logon script? Does the user have the correct permissions to use the print server?

'Luck
Stu

by keyboard cowboy

Well, here's what ended up happening. Apparently the "permission" error was not permissions. I had tried the net use statement with usernames in there, and it wouldn't work unless I was logged in as the admin. In XP, it's designed that way. Reference to Microsoft KB article #313644. In that article it goes on to give a workaround using the devcon.exe tool. That's what we ended up doing, and then I just put the batch file in the startup folder for the users. Thanks for all your help though.

This discussion is closed to new replies.