Solved

GPO startup script not running

Posted on 2011-09-03
9
871 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Invest in your employees with these five simple steps to improve employee engagement and retention.
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 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…

734 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