Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several batch programs that run from the windows scheduler. When there is no user logged into the server after a restart (at the login screen,) the first batch program to run connects to the network share fine, but then the next batch that runs can not access the drive.

net use responds with this:

System error 85 has occurred. 

The local device name is already in use. 

this is normal since the drive is usually already mapped.

the script returns with this error when it tries to access the mapped drive

Logon failure: unknown user name or bad password.

When I log in, the network drive appears to be mapped in My computer, but it is unaccessible. with the error "local device name is already in use"

If I disconnect the drive it come back and then says the Logon failure error.

share|improve this question

Net use isn't intended to work w/out a user logon so mapping a drive on boot w/out an actual logon isn't supported.

More General Info: Mapped drives require authentication to connect, which implies and normally requires a user to be logged on. You can force authentication or provide specific authentication credentials with Net Use....Net use X: \Server\ShareName /User:%username% %password%.

Once authenticated during a logon session all other connections to the same server must use the same credentials but w/out an actual logon all bets are off. Better option is to use a UNC path instead of a mapped drive for whatever resource you need to access.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.