mapping a network drive

August 4, 2009 at 10:41:14
Specs: Windows XP
I'm trying to write a batch file to map certain drives but some of the drives require a username and password. Is there a way to put this into in the batch file so no user intervention is required?
IE. if I was trying to map a drive I would use
net use g: \\server\foldername
but what would I put after that to automatically enter the username and password?

See More: mapping a network drive

Report •


#1
August 4, 2009 at 11:06:15
type net use /? for the exact syntax.

Yes you can put /user and password
Understand doing so is weak security since the user account and password are in clear text.


Report •

#2
August 4, 2009 at 11:15:45
Ah yes the help file! thanks Wanderer.

Report •

#3
August 4, 2009 at 15:38:37
If you just add the user to have rights to the folder then it will not ask for their login. This is much more secure. Is the computer a laptop using VPN and is not a member of the Domain?

Report •

Related Solutions

#4
August 5, 2009 at 08:15:53
We have two accounts here at work, one as a regular user and one with admin rights. For some reason, they gave us space on the server for our regular accounts but not for the account with admin rights. I just wanted to create a batch file that would automaticly map to my network drive with my admin account.

Report •

#5
August 5, 2009 at 10:06:46
What, who is they? If you have admin rights then are you not the administrator of the domain? If you are the administrator of the domain then go to the file server right click the shared folder and go to the security tab click edit then click add and add the administrator group.

Report •

#6
August 5, 2009 at 14:29:51
administrator of local machines, not the domain.

But don't sweat it, the batch file works fine for mapping the drive. problem solved.


Report •


Ask Question