Windows Server 2008 R2 Thread, Script not running within GP in Technical; So I'm a bit cheesed off with my Group Policy and I'm a bit stuck now.
I've got a piece ...
13th October 2010, 09:08 PM #1
Script not running within GP
So I'm a bit cheesed off with my Group Policy and I'm a bit stuck now.
I've got a piece of software that requires the registration key to be put in the registry under HKCU. So my choices were to require the user to input it the first time they use it (not really an option) or script it.
I've written my script, tested it and I know it works. Created a GPO and have it apply to a security group of computers. the GPO makes the necessary file and registry security changes and then runs a login script to make the necessary registry changes that's enable using the User group policy processing loopback. Now here is where we hit the problem. The scripts, as far as I can tell isn't running.
The script works if I manually run it when the user logs in. My printer scripts that are set up identically are running. My other login script that modifies the registry works (though that IS applied to the user). It even works if I replace the the users login script to this one. The rest of the policy is applying as I can see the security changes but fo some reason this VBS script won't work.
Any ideas what on earth could cause this as I'm stuck
IDG Tech News
14th October 2010, 11:09 AM #2
An additional update. I created a new GPO and assigned it to my test user. I added my script into the Login Script key within group policy and... script works.
So for some reason the new GPO I created that applies the security and the user login script isnt working and running the user setting. Whislt running the script for all users is not the end of the world I don't really want to be doing that for the sake of 15 computers. I just don't understand why the script won't run yet my printer scripts, which are set up in exacly the same way do.
14th October 2010, 11:17 AM #3
Could be one of two things.
1 - You say you applied the GP to a computer group, which unless has loopback enabled will not run the script at user logon.
2 - User may not have permission to run cmd, or scripts, or registry editing for that matter
I would recommend using Group Polict Client Side Extensions. You will have a nice GUI to add the reg entries with.
14th October 2010, 12:59 PM #4
Yep I've got loopback running and yep the users do have permissions to run the scripts.
I always forget about preferences for reg editing, might have a look.
Interestingly after some trial and error I discovered the problem. If I apply the GPO to a computer group (thorough the security filtering) the lookback processing doesn't process the user config. If I put it back to "Authenticated" user it all works well.
Given that I have to put a diffenet licence key into each comptuer and I really don't want to add rubbish to the registry on every computer I think I have three options:
1: User Preferences with Item level targetting (machine name)
2: Scripted applied to the whole network (the script looks at the machine name and only modifys the reg on certian machine but it means every machine has to run it
Not really sure what the "Best" solution to that is... I don't want the script running unncessarily.
Last edited by Stuart_C; 14th October 2010 at 01:14 PM.
14th October 2010, 01:24 PM #5
Option 1 sounds like a winner to me.
By mrbios in forum Scripts
Last Post: 23rd September 2010, 03:20 PM
By glennda in forum Windows
Last Post: 18th November 2009, 12:54 AM
By adamf in forum Windows Server 2000/2003
Last Post: 12th August 2009, 10:59 PM
Last Post: 27th February 2009, 02:08 PM
By pooley in forum Windows
Last Post: 5th January 2009, 12:31 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)