Sometimes Login Scripts Don't Run Properly

Our login scripts perform various functions, but are primarily for mapping drives.  I've noticed that sometimes the scripts run correctly and sometimes they don't.  For instance, there are several people that have to have there drive mappings manually deleted and remapped because the script isn't running correctly for them.  

There seems to be no pattern to it.  The systems that are affected vary and there is no consistent pattern of hardware, software, user, user rights or anything else that would explain this.  

Any help is appreciated.
cbentsenAsked:
Who is Participating?
 
cyberseanConnect With a Mentor Commented:
0
 
cbentsenAuthor Commented:
Our scripts have some prompts for the user in them.  This would prevent the user from seeing the login script being run, wouldn't it?
0
 
cyberseanCommented:
I wouldn't think so, but you may want to test it first.  Running them synchronously should just ensure each script is executed before the user gets to the desktop.  
0
 
JohnConnect With a Mentor Business Consultant (Owner)Commented:
In addition to the other posts here, when using scripts to map drives, I suggest making a script to delete said drives, putting the script into C:\windows\system32\grouppolicy\user\scripts\logoff. Then use gpedit.msc to run the script on logoff (includes shutdown).

Now before running such a script for the first time, delete the mapped drives with the option /PERSISTENT:NO.

Now, whenever the user logs off or shuts down, the mapped drives will be deleted. At the next startup, the drives should map properly. ... T
0
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.

All Courses

From novice to tech pro — start learning today.