Solved

GPO startup script not running

Posted on 2011-09-03
9
846 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
  • 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 39

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
 
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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 39

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

Are end users causing IT problems again?

You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

Join & Write a Comment

As a long-time IT Professional, the most important skill I have developed and consider to be my most valuable tool is Effective Troubleshooting. Step through my problem-solving procedure in this 10-step guide adapted from The Universal Troubleshooti…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
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 the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

706 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now