need step by step procedure to setup logon scripts in Win 2003 server

Hello - I am new to 2003 server - active directory.

I'd like to setup a server to use logon scripts.

I just want users drives to be automatically mapped.

As I said, I'm new to this so complete step by step instructions would be very helpful.

thank you in advance for your assistance,


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
Create a text file ending in .bat - for example, logon.bat

Then for each drive you want to map, use a set of lines like this:

REM - check if X: is already mapped, if so, delete it.
if exist x:\ net use x: /delete
REM - map X: to the share sharename on the server myserver
net use x: \\myserver\sharename

Then place this file on the domain controller in:
c:\windows\sysvol\sysvol\<your domain name>\scripts

Finally, on each user who you want to use the script, go to their account properties and set the logon script to be the same name as the text file - no path.

So if you used the sample I gave above, then the logon script would be:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lee W, MVPTechnology and Business Process AdvisorCommented:
You can also use Group Policy scripts as described here:

Note: there are multiple types of scripts - the two most common are batch and vbscript.  Batch is generally a simple grouping of commands you would type on the command line, vbscript is like writing a program.  You can do everything in vbscript, but it generally requires a good knowledge of visual basic to do things effectively.  And the code required is greater - the same kind of script as I gave you (mine is batch) done in vb would be 4-8 lines longer.
Cherukuri30Service EngineerCommented:
lets take an example. Assume that you have a user with the name "kerry" and there is folder with the name "kerry_files" (shared folder) in your server and when kerry logs into his computer this folder should be mapped as z drive in his computer.

SCRIPT you can use .VBS (VB SCRIPT) or .BAT file. this example is with VB SCRIPT.

' Beginning of the script

Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath, strUserName
strDriveLetter = "Z:"
strRemotePath = "\\computer name\kerry_files"
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath

' End of the script.

paste the above script  in notepad and save as logon.vbs

now copy this file in your server to the following location

c:\windows\sysvol\sysvol\your domain name\scripts

* your domain name is the name of your domain.

no open active directory users and computers

right click on the username kerry and select properties

and give the logon script name in the box "LOGON.VBS"

You are done

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.