Solved

GPO startup script not running

Posted on 2011-09-03
9
852 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Can’t get the mobile email signature right?

Not having any luck when trying to create an email signature for mobile devices? Does the formatting keep messing up? Make sure you have great email signatures on all devices by using Exclaimer Cloud - Signatures for Office 365.

Question has a verified solution.

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

Both MMF (multi-mode fiber) and SMF (single-mode fiber) are types of optical fiber that can aid in communication applications. These thin strands of silica or glass will allow communication to occur between devices. The transmission of light between…
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

948 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

23 Experts available now in Live!

Get 1:1 Help Now