Link to home
Start Free TrialLog in
Avatar of aclaus225
aclaus225

asked on

Why Is My Script Not Running at Login for Users?

I know it is a very vague question, but at login and logout I have scripts that run, or they are supposed to.  At login there should be a script running that maps necessary network drives and at logout there is a script that disconnect all drives.  I have the "login" script set up in GPO User Settings (login) and GPO Computer Settings (startup) and that script does not seem to run.  I also have it in each individual user's profile in Active Directory in addition to a mapped home drive.  The mapped home drive appears every time, but the login script is not running.  It used to be that I would get an error message saying that the drive already existed, so I knew that it was running, but now nothing is happening.  If I manually go to the location of the script and click on it to run it will run, so I know that it works, but what additional steps do I need to take to get this login script to run?
SOLUTION
Avatar of Spencer Scherer
Spencer Scherer
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
Avatar of McKnife
You haven't mentioned what client OS we are talking about.
Win 8.x and Win10 have a logon script delay of 5 minutes incorporated by default. That can be turned off by GPO: https://support.microsoft.com/en-us/kb/2895815
Avatar of aclaus225
aclaus225

ASKER

Sorry.  These machines are all Windows 7.  The thing is, this script had worked for over a year and I made no changes.  I am going through the System log to find anything related to that.
Start small.
Create another logon script that simply goes (batch code):
md %userprofile%\test
and see if that folder c:\users\yourname\test gets created.
I tried the basic script you suggested and in Group Policy it did not run.  Once I put it into Logon Script for User Profile through AD it did run.
ASKER CERTIFIED 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
I set up a new GPO with the script in it and it ran fine.  I am not exactly sure what is wrong with the original GPO as all settings are the same, or at least from what I can tell.
While it is not the best solution I applied individual scripts to individual profiles to get around this problem.  I could get a VB script to run for everyone, but it was erring out, so I went to individuals to solve my problem.