Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

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. http://support.microsoft.com/kb/180362

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
add comment

Your Answer

 
discard

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