[Last Call] Learn how to a build a cloud-first strategyRegister Now


Sometimes Login Scripts Don't Run Properly

Posted on 2008-11-03
Medium Priority
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
  • 2

Accepted Solution

cybersean earned 750 total points
ID: 22870104

Author Comment

ID: 22870258
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?

Expert Comment

ID: 22870562
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 99

Assisted Solution

by:John Hurst
John Hurst earned 750 total points
ID: 22870639
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
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 video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

829 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