Windows Login Script Error

I logged in to XP machine connected to Windows 2003 Active Directory domain. My home directory mapped through a login script--- issues: 1) each time I login in I lose my home directory so I have to map it manually again 2) I keep getting error message on my screen (see attached file) the blank is the server name. How do I fix this error message?

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.

Is your DNS server in the system set to the internal DNS Server for the domain?
savoyajolieAuthor Commented:
Can you clarify your question? If you meant that the server reporting netlogon script error is a DNS server yes it is.
logintest.vbs is attempting to map a drive that is already mapped.  With in the VBS script you should clear the mappings on the drives before assining them.  Something like this:

<<Script Start>>
On Error Resume Next

Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("Wscript.Network")

'removes mapped drive H
objNetwork.RemoveNetworkDrive "H:", True, True

'creats maped drive H
objNetwork.MapNetworkDrive "H:", "\\Server\Share"
<<Script End>

This will remove the mapping, then go ahead and run the line to map it.

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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

savoyajolieAuthor Commented:
We have already a script called login.vbs that allows home directory and other network drive mapping. Can I delete logintest.vbs from netlogon?
If I use your script where do I run it under netlogon or on the my desktop?
wait wait, don't run my script per se.  I just wanted to give you an example.  Here is what I think is happening from your slighlty unclear explaination.  You are asking the script logintest.vbs to map a drive for you that is already mapped.  It is faulting and doesn't have "On Error Resume Next".  So either the script fails before mapping the drives, or the confilict in the script prevents the drives from being mapped.

You have mentioned nothing about login.vbs in you earlier posts so I can't advise you on that.  What I can tell you is that I find it to be bad practice to run 2 scripts that are meant to compliment each other at the same time.  You should combine the scripts into one so you don't get timing issues.  If you are not familiar with VBS maybe go back to a batch script, I prefer batch for longin scripts.  

You can use my code snipit to remove any drive mappings that you will be assigning later in the script.  Said another way:  if my script is going to assign an H: drive to \\server\%username\  I will have the script remove any mappings to H: that may already exist on the computer first using the code above and then later in the same script map the H: drive
Set clDrives = WshNetwork.EnumNetworkDrives
For i = 0 to clDrives.Count -1 Step 2
WSHNetwork.RemoveNetworkDrive clDrives.Item(i), True, True

is better for clearing drives if you want to use code I give you.
Did you check to see if H: wasn't already being set by Active Directory as well.  That will cause those issues (even if you think you are removing the mapping).
savoyajolieAuthor Commented:
Thank you very much kind4me and sr75 I learned something new from both of you. The problem was reported to me but I never wrote those scripts and I wrote to you becuase I want to implement a better scripting by understanding the problem first. Having said that I would like

1) To replace the VBS script using batch files for login scripts--- kind4me can you assist me how to get better information on writing a batch

2) sr75 to answer your question the user's H: drive was mapped through Active Directory as well. So do you want me to remove the Active Directory mapping if we are using the script mapping? Are you recommending to use either Active Directory mapping or login script mapping instead of using both?

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 OS

From novice to tech pro — start learning today.