Solved

GPO startup script not running

Posted on 2011-09-03
9
876 Views
Last Modified: 2012-05-12
1. I have a 2008 DC and a 2003 terminal server.
2. the vbs script is in the \\DCSERVER\NETLOGON folder

The script wont run when I set this script in the GPO default policy to run from the Scripts (Startup/Shutdown)
but it is running when I set this script in the GPO default policy to run from the Scripts (Logon/Logoff)

I need this script to run during startup. any idea why it wont run from there?
0
Comment
Question by:OrenRozen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 7

Expert Comment

by:myhc
ID: 36478958
have you allowed for two PC reboots or forced gpupdate and then rebooted?
0
 
LVL 40

Expert Comment

by:footech
ID: 36478981
You're saying you've added this the Default Domain Policy, or Default Domain Controllers Policy?

Where are you trying to get this script to run (on which machine)?

Startup/Shutdown scripts are computer settings, while Logon/Logoff scripts are user settings.  If the script relies on user information it won't be able to run as a startup script.

I would use the GP Results Wizard in GPMC to see if the setting is being applied to your desired target or not.  Depending on the target's location in your OU structure, there could be a number of reasons why it isn't being applied.
0
 
LVL 7

Expert Comment

by:Martin81
ID: 36479091
My guess would be the GPO you are applying the script from is linked to an OU containing users not computers? You'll need to apply it from a GPO that's linked to an OU containing computer accounts to run it as a startup script.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 3

Author Comment

by:OrenRozen
ID: 36479511
Thanks for the help.

- The script is applied to the Default Domain Policy
- Basically, the script is running an application if the user is a member of a specific group. The application copy some files to the desktop and create link on the desktop.
- The user is logging to the 2008 terminal server
- What I would like to do is run the script BEFORE the explorer.exe is starting

0
 
LVL 7

Accepted Solution

by:
Martin81 earned 300 total points
ID: 36480270
That can't work as  a startup script because it won't be able to asses if the user is a member of a group, since it's running at startup it's not running in the context of a particular user. You will need to run it as a login script.
0
 
LVL 3

Author Comment

by:OrenRozen
ID: 36480289
Thanks Martin81.
Any options to run a script before the explorer starts? before the userinit starts?
0
 
LVL 7

Expert Comment

by:Martin81
ID: 36480357
Not that I know of. What's the problem if you run it as a logon script?
0
 
LVL 3

Author Comment

by:OrenRozen
ID: 36480378
I want to make sure everything on the application will run before the user starts to work.

for my ow knoledege, Startup scripts run before user authentication and logon scripts run after?
if so, whats the diferrence between setting the script using the GPO logon or setting the script to run from the HKLM or HKCU\....\run ? what comes first?
0
 
LVL 40

Assisted Solution

by:footech
footech earned 200 total points
ID: 36480609
I don't know the exact order, but items in the HKLM\.....\Run should start before the GPO logon or HKCU\.....\Run scripts.
If you want to find out for sure, you can do this:
create a .BAT file for each place you are wondering about
each .BAT file will only have one line, for example
@echo This is a GPO startup script >> c:\result\scriptorder.txt
@echo This is a GPO logon script >> c:\result\scriptorder.txt
@echo This is a HKLM script >> c:\result\scriptorder.txt
@echo This is a HKCU script >> c:\result\scriptorder.txt
Set one .BAT file to run using each method as appropriate.
Restart the computer and log in.
Then examine the "scriptorder.txt" file and the order they're listed in will be the order they ran in.  I wouldn't be surprised if the order of the login scripts changed occasionally, or if the order of the startup scripts did, though login will always be after startup.
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
Suggested Courses

615 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