Solved

Why Is My Script Not Running at Login for Users?

Posted on 2016-10-27
8
46 Views
Last Modified: 2016-11-17
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?
0
Comment
Question by:aclaus225
  • 4
  • 3
8 Comments
 
LVL 3

Assisted Solution

by:Spencer Scherer
Spencer Scherer earned 250 total points
ID: 41862820
Take a look at this article, it could possibly explain what is going on with your script.

https://community.spiceworks.com/topic/367307-login-scripts-not-running

Additionally, can you create another login script / use another one successfully, or are none working?  Can you create a new one and get it to work (even if its basic and just keeps the CMD window open)?
1
 
LVL 54

Expert Comment

by:McKnife
ID: 41863641
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
0
 

Author Comment

by:aclaus225
ID: 41864114
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.
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 54

Expert Comment

by:McKnife
ID: 41864137
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.
0
 

Author Comment

by:aclaus225
ID: 41864250
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.
0
 
LVL 54

Accepted Solution

by:
McKnife earned 250 total points
ID: 41864278
So your gpo is the culprit, it is not being used?
use rsop.msc at the client to see whether the script ought to be used.
0
 

Author Comment

by:aclaus225
ID: 41864348
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.
0
 

Author Closing Comment

by:aclaus225
ID: 41891948
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.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

803 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