Unable to automount Network Share in windows

I have a win2k3 server that needs to mount a netapp CIFS share automatically at boot. The issue isnt that i cant mount the drive, i need to automount the drive during boot and before users log in. I tried using autoexnt.bat, it mounts the drive but doesnt seem to pass the username and password.

right now my script looks like :
@echo off
net use P: \\sharname\share /user:username password

Any other ideas?

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

msgopakumarConnect With a Mentor Commented:
i'm assuming some of the services started at system boot need this storage (such as media server).
i got this working using the srvany tool from microsoft.  use net use in a batch file. once the service is set-up, make sure to select start at boot.
also, you may need to add the dependancy for this service to the netlogon service

for detailed instructions, look at
Hope this helps

try net use P: \\ipaddress\share /user:\\DOMAIN\username password
what debuggerau said.
Also you may want to use

net use P: /delete

first - to delete an existing connection (which may be as a different user?)
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

wallie400Author Commented:
Well the machine isnt on a domain. I had thought about that.

Any other suggestions? Maybe a .vbs script that someone has?

why not just use explorer -> Map network drive...

Or are you sharing the share?
wallie400Author Commented:
The share is on a Netapp, It needs to automount without a user logging in.
why would you want to automount something without any users?
All Courses

From novice to tech pro — start learning today.