Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Microsoft
cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping a network drive script for Win XP

James Allan
Occasional Visitor

Mapping a network drive script for Win XP

Hi I work at a school that has machines running WinXP Pro. I am looking for a script that will allow the students to map a network drive space. the problem i have is all the scripts i have founda do not allow for the students to logon as a differnet user.
when mapping the drive from my computer. they need to go to tools map network drive. enter in the \\server\username and then select logon as a different user so they can enter in there username and password. is there anyone who knows alot about scripts who could help me out with this. or even better write a script for me that works. i would like to beable to place the script on the machines desktops so they can just double click the icon and enter in their username and password. as the actual mapping a network drive has alot of steps for the age group of student i am working with.


thankyou James.
7 REPLIES
Paul Sperry
Honored Contributor

Re: Mapping a network drive script for Win XP

create a file on the desktop called mapdrive.bat or something. Edit that file and put this in it:

net use X: \\server\share /user:domain\userid password


Now all the kids have to do is double click on the file and the share will be mapped.

Jon Finley
Honored Contributor

Re: Mapping a network drive script for Win XP

Are they logging in as themselves or as a common single user?

i.e. Using the same login as they use to get to their desktop?

or

Using a "lab" shared drive to connect to all as the same user?


If the User is the same as logged in, the drive mapping will attempt to auto login using the existing credentials.

If a common login, then Paul's example using the ID and password on the NET USE line will work.

Jon
"Do or do not. There is no try!" - Yoda
James Allan
Occasional Visitor

Re: Mapping a network drive script for Win XP

they are using a generic lab login so unfortunatly they do not match

i tried useing the above mentioned method and it did not work

thanks for your help kepp the suggestions coming

James
Paul Sperry
Honored Contributor

Re: Mapping a network drive script for Win XP

Well if they all use the same login just set the home folder in that users profile to the share. Either in Active Directory or on your Domain controller (depending on your enviroment).
Jon Finley
Honored Contributor

Re: Mapping a network drive script for Win XP

James, what we did for our lab was to stick a lab.cmd file in C:\Windows, then placed a shortcut into the Startup folder.

The contents of the CMD file were:

NET USE S: \\dltlan\labshare /user:DLT\aecplab labpassword

We also set the "My documents" folder to point to the S: drive.

The aecplab account has full permissions to the share.

Jon
"Do or do not. There is no try!" - Yoda
Nguyen Anh Tien
Honored Contributor

Re: Mapping a network drive script for Win XP

net use tool can help you do this tast
net use R: \\server_name\share_name /user:domain\userid password
tienna
HP is simple
Alan_152
Honored Contributor

Re: Mapping a network drive script for Win XP

Are you on a domain or AD network? I would put the "net use" command as part of the users' login scripts and set up the directories as accessable by group (which you would assign the users to).