Link to home
Start Free TrialLog in
Avatar of savoyajolie
savoyajolieFlag for United States of America

asked on

Windows Login Script Error

Hi,
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?
Thanks,
Savi

scripterror.bmp
Avatar of johnb6767
johnb6767
Flag of United States of America image

Is your DNS server in the system set to the internal DNS Server for the domain?
Avatar of savoyajolie

ASKER

Can you clarify your question? If you meant that the server reporting netlogon script error is a DNS server yes it is.
ASKER CERTIFIED SOLUTION
Avatar of kind4me
kind4me
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Next

is better for clearing drives if you want to use code I give you.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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?

Thanks,
Savi