Sometimes Login Scripts Don't Run Properly

Posted on 2008-11-03
Last Modified: 2010-03-17
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.
Question by:cbentsen
    LVL 4

    Accepted Solution


    Author Comment

    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?
    LVL 4

    Expert Comment

    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.  
    LVL 89

    Assisted Solution

    by:John Hurst
    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

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
    This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now